Members
listener
The listener function attached to this logger.
name
The name of this logger
Methods
error()
Logs at ERROR level.
warn()
Logs at ERROR level.
info()
Logs at INFO level.
debug()
Logs at DEBUG level.
trace()
Logs at TRACE level.
atLevel(level, msg, …objects)
Logs a message at the supplied level. The message may include placeholders {} which will be substituted into the message string only if the message is actually logged.
Example
log.atLevel('INFO', 'The widget was created as {}', widget);
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
level |
string | The level at which to log, such as 'INFO', or 'DEBUG' |
||
msg |
string | Error | the message to log, possibly with object placeholders |
||
objects |
Array.<object> |
<repeatable> |
[
|
the objects to substitute into the log message |