<BlockSwitcher>
<Block name="Java">

```java
Logger logger = Amplify.Logging.logger(AmplifyCategory.Auth, "<namespace>")
try {
  String result = doSomething();
  logger.debug("result: " + result);
} catch(Exception: exception) {
  logger.error("operation failed", exception);
}

```

</Block>
<Block name="Kotlin">

```kotlin
val logger = Amplify.Logging.logger(AmplifyCategory.Auth, "<namespace>")
try {
  val result = doSomething()
  logger.debug("result: $result")
} catch (exception: Exception) {
  logger.error("operation failed", exception)
}
```

</Block>
<Block name="RxJava">

```java
Logger logger = Amplify.Logging.logger(AmplifyCategory.Auth, "<namespace>")
try {
  String result = doSomething();
  logger.debug("result: " + result);
} catch(Exception: exception) {
  logger.error("operation failed", exception);
}
```
</Block>
</BlockSwitcher>
