|
| 1 | +# Usage |
| 2 | + |
| 3 | +There is a great original [manual][manual]. |
| 4 | + |
| 5 | +The configuration is similar to [SLF4J Simple][slf4j-simple]. |
| 6 | + |
| 7 | +It looks for the `lambda-logger.properties` resource and read properties: |
| 8 | + |
| 9 | +* **dateTimeFormat** - The date and time format to be used in the output messages. The pattern |
| 10 | + describing the date and time format is defined by [SimpleDateFormat][]. If the format is not |
| 11 | + specified or is invalid, the number of milliseconds since start up will be output. |
| 12 | +* **defaultLogLevel** - Default log level for all instances of LambdaLogger. |
| 13 | + Must be one of (_trace_, _debug_, _info_, _warn_, _error_), a value is case-insensitive. |
| 14 | + If not specified, defaults to _info_. |
| 15 | +* **levelInBrackets** - Should the level string be output in brackets? Defaults to `false`. |
| 16 | +* **showDateTime** - Set to `true` if you want the current date and time to be included in output |
| 17 | + messages. Defaults to `false`. |
| 18 | +* **showLogName** - Set to `true` if you want the Logger instance name to be included in output |
| 19 | + messages. Defaults to `true`. |
| 20 | +* **showShortLogName** - Set to `true` if you want the last component of the name to be included in |
| 21 | + output messages. Defaults to `false`. |
| 22 | +* **showThreadId** - If you would like to output the current thread id, then set to `true`. |
| 23 | + Defaults to `false`. |
| 24 | +* **showThreadName** - Set to `true` if you want to output the current thread name. |
| 25 | + Defaults to `false`. |
| 26 | + |
| 27 | +The environment variables overrides the properties: **LOG_DATE_TIME_FORMAT**, **LOG_DEFAULT_LEVEL**, |
| 28 | +**LOG_LEVEL_IN_BRACKETS**, **LOG_SHOW_DATE_TIME**, **LOG_SHOW_NAME**, **LOG_SHOW_SHORT_NAME**, |
| 29 | +**LOG_SHOW_THREAD_ID**, **LOG_SHOW_THREAD_NAME**. |
0 commit comments