A generic logging interface modeled after the Pino logger.
If your preferred logger does not match this interface you can create a
wrapper that does.
Methods
# debug(obj, msg) → {LogFn}
Log at `'debug'` level the given msg.
Parameters:
Name | Type | Description |
---|---|---|
obj |
an object containing additional context about the log message. The intention is for your logger to output this context as additional metadata accompanying the log message. | |
msg |
the log message to write | |
...interpolationArgs |
all arguments supplied after message are intended for serialization and interpolation into `msg`, using any printf-style placeholders it has, e.g. (%s, %d, %o|%O|%j) |
LogFn
# error(obj, msg) → {LogFn}
Log at `'error'` level the given msg.
Parameters:
Name | Type | Description |
---|---|---|
obj |
an object containing additional context about the log message. The intention is for your logger to output this context as additional metadata accompanying the log message. | |
msg |
the log message to write | |
...interpolationArgs |
all arguments supplied after message are intended for serialization and interpolation into `msg`, using any printf-style placeholders it has, e.g. (%s, %d, %o|%O|%j) |
LogFn
# fatal(obj, msg) → {LogFn}
Log at `'fatal'` level the given msg.
Parameters:
Name | Type | Description |
---|---|---|
obj |
an object containing additional context about the log message. The intention is for your logger to output this context as additional metadata accompanying the log message. | |
msg |
the log message to write | |
...interpolationArgs |
all arguments supplied after message are intended for serialization and interpolation into `msg`, using any printf-style placeholders it has, e.g. (%s, %d, %o|%O|%j) |
LogFn
# info(obj, msg) → {LogFn}
Log at `'info'` level the given msg.
Parameters:
Name | Type | Description |
---|---|---|
obj |
an object containing additional context about the log message. The intention is for your logger to output this context as additional metadata accompanying the log message. | |
msg |
the log message to write | |
...interpolationArgs |
all arguments supplied after message are intended for serialization and interpolation into `msg`, using any printf-style placeholders it has, e.g. (%s, %d, %o|%O|%j) |
LogFn
# trace(obj, msg) → {LogFn}
Log at `'trace'` level the given msg.
Parameters:
Name | Type | Description |
---|---|---|
obj |
an object containing additional context about the log message. The intention is for your logger to output this context as additional metadata accompanying the log message. | |
msg |
the log message to write | |
...interpolationArgs |
all arguments supplied after message are intended for serialization and interpolation into `msg`, using any printf-style placeholders it has, e.g. (%s, %d, %o|%O|%j) |
LogFn
# warn(obj, msg) → {LogFn}
Log at `'warn'` level the given msg.
Parameters:
Name | Type | Description |
---|---|---|
obj |
an object containing additional context about the log message. The intention is for your logger to output this context as additional metadata accompanying the log message. | |
msg |
the log message to write | |
...interpolationArgs |
all arguments supplied after message are intended for serialization and interpolation into `msg`, using any printf-style placeholders it has, e.g. (%s, %d, %o|%O|%j) |
LogFn