# Logger

The Logs a message with the specified log level, tag, message, and optional throwable.

The Logs a message with the specified [log level](https://developers.webexconnect.io/docs/loglevel), tag, message, and optional throwable.

**Syntax:** `open override fun log(level: LogLevel, tag: String?, msg: String?, tr: Throwable?)`

**Parameters**

| Parameter | Type                                                         | Description                                                |
| :-------- | :----------------------------------------------------------- | :--------------------------------------------------------- |
| level     | [LogLevel](https://developers.webexconnect.io/docs/loglevel) | The log level of the message.                              |
| tag       | String                                                       | The tag for the log message.                               |
| msg       | String                                                       | The log message.                                           |
| tr        | Throwable                                                    | The optional throwable is associated with the log message. |

## shouldLog

Check if the logger should log a message with the specified log level.

**Syntax**: `open override fun shouldLog(level: LogLevel): Boolean`

**Return** True if the logger should log the message, false otherwise.

**Parameters**

| Parameter | Type                                                         | Description             |
| :-------- | :----------------------------------------------------------- | :---------------------- |
| level     | [LogLevel](https://developers.webexconnect.io/docs/loglevel) | The log level to check. |