Proxy to access the system logger from application code.
- Source:
Extends
Methods
(static) newInstance($, spec) → {Promise.<Array.<any>>}
- Source:
Factory method to create a proxy to a logger service.
Parameters:
Name | Type | Description |
---|---|---|
$ |
ctxType | A context containing references to other components. |
spec |
specType | Configuration data for this component. |
Returns:
A tuple array returning an optional Error
in the first argument, or the new component in the second.
- Type
- Promise.<Array.<any>>
debug(msg)
- Source:
Logs msg at DEBUG level.
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | A message to be logged. |
error(msg)
- Source:
Logs msg at ERROR level.
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | A message to be logged. |
fatal(msg)
- Source:
Logs msg at FATAL level.
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | A message to be logged. |
info(msg)
- Source:
Logs msg at INFO level.
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | A message to be logged. |
isActive(candidateLevel) → {boolean}
- Source:
Checks if a candidate level would log with current settings.
Parameters:
Name | Type | Description |
---|---|---|
candidateLevel |
string | A candidate level. |
Returns:
True if that level is logged.
- Type
- boolean
trace(msg)
- Source:
Logs msg at TRACE level.
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | A message to be logged. |
warn(msg)
- Source:
Logs msg at WARN level.
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | A message to be logged. |