JS API Reference
Module: utils/logger/defaultLogger
Table of contents
Functions
Functions
defaultLogger
▸ defaultLogger(namespace
, opts?
): Object
Creates a logger that uses the debug library. This logger is used by default by all entities in the SDK.
If the namespace is not prefixed with golem-js:
, it will be prefixed automatically - this can be controlled by disableAutoPrefix
options.
Parameters
Name | Type |
---|---|
namespace | string |
opts | DefaultLoggerOptions |
Returns
Object
Name | Type |
---|---|
child | (childNamespace : string ) => { child: (childNamespace: string) => ...; info: (msg: string) => void; error: (msg: string) => void; warn: (msg: string) => void; debug: (msg: string) => void; log: (msg: string, ctx?: Error | Record<...> | undefined) => void; } |
info | (msg : string ) => void |
error | (msg : string ) => void |
warn | (msg : string ) => void |
debug | (msg : string ) => void |
log | (msg : string , ctx? : Error | Record <string , unknown >) => void |