Constructor
new @ui5/logger/Logger(moduleName)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
moduleName |
string | Identifier for messages created by this logger.
Example: module:submodule:Class |
Members
LOG_EVENT_NAME :string
- Description:
- Event name used for emitting new log-message event on the
processobject
- Event name used for emitting new log-message event on the
- Source:
Event name used for emitting new log-message event on the
process object
Type:
- string
LOG_LEVELS :Array.<string>
- Description:
- Available log levels, ordered by priority:
- silly
- verbose
- perf
- info (default)
- warn
- error
- silent
silentis special in the sense that no messages can be submitted with that level. It can be used to suppress all logging.
- Available log levels, ordered by priority:
- Source:
Available log levels, ordered by priority:
- silly
- verbose
- perf
- info (default)
- warn
- error
- silent
silent is special in the sense that no messages can be submitted with that level.
It can be used to suppress all logging.
Type:
- Array.<string>
Methods
error(…message)
- Description:
- Create a log entry with the
errorlevel
- Create a log entry with the
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
message |
any |
<repeatable> |
Messages to log. An automatic string conversion is applied if necessary |
info(…message)
- Description:
- Create a log entry with the
infolevel
- Create a log entry with the
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
message |
any |
<repeatable> |
Messages to log. An automatic string conversion is applied if necessary |
isLevelEnabled(levelName) → {boolean}
- Description:
- Tests whether the provided log level is enabled by the current log level
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
levelName |
string | Log level to test |
Returns:
True if the provided level is enabled
- Type
- boolean
perf(…message)
- Description:
- Create a log entry with the
perflevel
- Create a log entry with the
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
message |
any |
<repeatable> |
Messages to log. An automatic string conversion is applied if necessary |
silly(…message)
- Description:
- Create a log entry with the
sillylevel
- Create a log entry with the
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
message |
any |
<repeatable> |
Messages to log. An automatic string conversion is applied if necessary |
verbose(…message)
- Description:
- Create a log entry with the
verboselevel
- Create a log entry with the
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
message |
any |
<repeatable> |
Messages to log. An automatic string conversion is applied if necessary |
warn(…message)
- Description:
- Create a log entry with the
warnlevel
- Create a log entry with the
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
message |
any |
<repeatable> |
Messages to log. An automatic string conversion is applied if necessary |
(static) getLevel() → {string}
- Description:
- Gets the current log level
- Source:
Returns:
The current log level. Defaults to
info
- Type
- string
(static) isLevelEnabled(levelName) → {boolean}
- Description:
- Tests whether the provided log level is enabled by the current log level
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
levelName |
string | Log level to test |
Returns:
True if the provided level is enabled
- Type
- boolean
(static) setLevel(levelName)
- Description:
- Sets the standard log level.
Example: Setting it toperfwould suppress allsillyandverboselogging, and only showperf,info,warnanderrorlogs.
- Sets the standard log level.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
levelName |
string | New log level |