Skip to main content

IRuntimeLogger<Prefixes>

Logger with browser methods, as well as async disposability.

Extends​

  • BaseLogger

Type Parameters​

Type ParameterDefault type
Prefixes extends string[]string[]

Properties​

debug​

debug: LogFn;

Log at 'debug' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param​

the interface of the object being serialized. Default is object.

Param​

object to be serialized

Param​

the log message to write

Param​

format string values when msg is a format string

Inherited from​

pino.BaseLogger.debug


error​

error: LogFn;

Log at 'error' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param​

the interface of the object being serialized. Default is object.

Param​

object to be serialized

Param​

the log message to write

Param​

format string values when msg is a format string

Inherited from​

pino.BaseLogger.error


fatal​

fatal: LogFn;

Log at 'fatal' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param​

the interface of the object being serialized. Default is object.

Param​

object to be serialized

Param​

the log message to write

Param​

format string values when msg is a format string

Inherited from​

pino.BaseLogger.fatal


info​

info: LogFn;

Log at 'info' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param​

the interface of the object being serialized. Default is object.

Param​

object to be serialized

Param​

the log message to write

Param​

format string values when msg is a format string

Inherited from​

pino.BaseLogger.info


level​

level: LevelWithSilentOrString;

Set this property to the desired logging level. In order of priority, available levels are:

  • 'fatal'
  • 'error'
  • 'warn'
  • 'info'
  • 'debug'
  • 'trace'

The logging level is a minimum level. For instance if logger.level is 'info' then all 'fatal', 'error', 'warn', and 'info' logs will be enabled.

You can pass 'silent' to disable logging.

Inherited from​

pino.BaseLogger.level


prefixes​

prefixes: Prefixes;

The prefixes for the logger.


silent​

silent: LogFn;

Noop function.

Inherited from​

pino.BaseLogger.silent


trace​

trace: LogFn;

Log at 'trace' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param​

the interface of the object being serialized. Default is object.

Param​

object to be serialized

Param​

the log message to write

Param​

format string values when msg is a format string

Inherited from​

pino.BaseLogger.trace


warn​

warn: LogFn;

Log at 'warn' level the given msg. If the first argument is an object, all its properties will be included in the JSON line. If more args follows msg, these will be used to format msg using util.format.

Type Param​

the interface of the object being serialized. Default is object.

Param​

object to be serialized

Param​

the log message to write

Param​

format string values when msg is a format string

Inherited from​

pino.BaseLogger.warn


withPrefix()​

withPrefix: <ChildPrefixes>(...prefixes) => IRuntimeLogger<[...Prefixes[], ...ChildPrefixes[]]>;

Type Parameters​

Type Parameter
ChildPrefixes extends string[]

Parameters​

ParameterType
...prefixesChildPrefixes

Returns​

IRuntimeLogger<[...Prefixes[], ...ChildPrefixes[]]>

Methods​

[asyncDispose]()​

asyncDispose: Promise<void>

Returns​

Promise<void>


child()​

child<ChildPrefixes>(bindings, options?): IRuntimeLogger<[...Prefixes[], ...ChildPrefixes[]]>

Type Parameters​

Type Parameter
ChildPrefixes extends string[]

Parameters​

ParameterType
bindingsBindings
options?ChildLoggerOptions<any>

Returns​

IRuntimeLogger<[...Prefixes[], ...ChildPrefixes[]]>