android-components / mozilla.components.support.base.log.logger / Logger

# Logger

`class Logger` (source)

A wrapper for the Log object providing a more convenient API for logging.

### Parameters

`tag` - The tag to be used for log messages send via this logger.

### Constructors

<init> | `Logger(tag: String? = null)` A wrapper for the Log object providing a more convenient API for logging.

### Functions

debug | `fun debug(message: String? = null, throwable: Throwable? = null): Unit` Send a DEBUG log message.
error | `fun error(message: String? = null, throwable: Throwable? = null): Unit` Send a ERROR log message.
info | `fun info(message: String? = null, throwable: Throwable? = null): Unit` Send a INFO log message.
measure | `fun measure(message: String, block: () -> Unit): Unit` Measure the time it takes to execute the provided block and print a log message before and after executing the block.
warn | `fun warn(message: String? = null, throwable: Throwable? = null): Unit` Send a WARN log message.

### Companion Object Functions

debug | `fun debug(message: String? = null, throwable: Throwable? = null): Unit` Send a DEBUG log message.
error | `fun error(message: String? = null, throwable: Throwable? = null): Unit` Send a ERROR log message.
info | `fun info(message: String? = null, throwable: Throwable? = null): Unit` Send a INFO log message.
measure | `fun measure(message: String, block: () -> Unit): Unit` Measure the time it takes to execute the provided block and print a log message before and after executing the block.
warn | `fun warn(message: String? = null, throwable: Throwable? = null): Unit` Send a WARN log message.