Logger Interface
LoggerInterface
Defines the interface of a logger used by all the modules.
Kind: global class
- LoggerInterface
- .level
- .clear()
- ._getLevelNumber(level) ⇒
number - ._log(level, arg)
- ._writeLog(level, entry)
- .debug(message) ⇒
Promise - .info(message) ⇒
Promise - .warning(message) ⇒
Promise - .error(message) ⇒
Promise - .fatal(message) ⇒
Promise - ._getTime()
loggerInterface.level
sets a new log level
Kind: instance property of LoggerInterface
| Param | Type | Description |
|---|---|---|
| level | number/string | The logLevel as number or String value |
loggerInterface.clear()
Clears all the existing log entries Placeholder for the implementing loggers
Kind: instance method of LoggerInterface
loggerInterface._getLevelNumber(level) ⇒ number
returns the logLevel as a number
Kind: instance method of LoggerInterface
Returns: number - num The loglevel as a number
| Param | Type | Description |
|---|---|---|
| level | string | The loglevel as a string |
loggerInterface._log(level, arg)
Do the logging
Kind: instance method of LoggerInterface
| Param | Type | Description | |
|---|---|---|---|
| level | string | The log level of the current entry | |
| arg | string \ | object | The data to log |
loggerInterface._writeLog(level, entry)
Writes the log, or do what ever. At this point in time the logs with the wrong level arte already filtered
Kind: instance method of LoggerInterface
| Param | Type | Description | |
|---|---|---|---|
| level | string | The log level of the current entry | |
| entry | string \ | object | The data to log |
loggerInterface.debug(message) ⇒ Promise
Logs the given message with the level 'debug'
Kind: instance method of LoggerInterface
Returns: Promise - promise A promise when the log is written
| Param | Type | Description |
|---|---|---|
| message | string/object | The message or data to log |
loggerInterface.info(message) ⇒ Promise
Logs the given message with the level 'info'
Kind: instance method of LoggerInterface
Returns: Promise - promise A promise when the log is written
| Param | Type | Description |
|---|---|---|
| message | string/object | The message or data to log |
loggerInterface.warning(message) ⇒ Promise
Logs the given message with the level 'warning'
Kind: instance method of LoggerInterface
Returns: Promise - promise A promise when the log is written
| Param | Type | Description |
|---|---|---|
| message | string/object | The message or data to log |
loggerInterface.error(message) ⇒ Promise
Logs the given message with the level 'error'
Kind: instance method of LoggerInterface
Returns: Promise - promise A promise when the log is written
| Param | Type | Description |
|---|---|---|
| message | string/object | The message or data to log |
loggerInterface.fatal(message) ⇒ Promise
Logs the given message with the level 'fatal'
Kind: instance method of LoggerInterface
Returns: Promise - promise A promise when the log is written
| Param | Type | Description |
|---|---|---|
| message | string/object | The message or data to log |
loggerInterface._getTime()
Returns the current time in the format used by this logger
Kind: instance method of LoggerInterface