Interface

ILogger

ILogger

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.

View Source logger.ts, line 13

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)

View Source logger.ts, line 71

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)

View Source logger.ts, line 32

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)

View Source logger.ts, line 19

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)

View Source logger.ts, line 58

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)

View Source logger.ts, line 84

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)

View Source logger.ts, line 45

LogFn