@gik/tools-logger
v0.0.9
Published
A wrapper around Pino logger, with some extra features. Part of our [tools suite](https://github.com/gikmx/tools).
Downloads
4
Readme
@gik/tools-logger 0.0.9
A wrapper around Pino logger, with some extra features. Part of our tools suite.
Contributors
Supported platforms
- darwin
- linux
Table of contents
- logger A wrapper around pino.
- Types ``
- ParamTypeError
typedef
Thrown when invalid parameters are sent to the constructor.
- ParamTypeError
logger
A wrapper around pino.
Behaviour
When the environment is non-production it will output prettier logs.
Unless
cfg.nothrow
is set to true, All calls toerror
will use @gik/tools-thrower halting the execution when the environment is non-production (ie: development) however, when in production it will always fallback to Pino's default logger.When
cfg.extreme
is set to true and the environment is set as production it will load extreme-mode adding an even faster approach to logging. (make sure to read the documentation about the caveats)
Parameters
Returns
Types.Instance
- A function that you can use for logging.
Throws
Types.ParamTypeError
- When parameters are not valid.
Types
Members
ParamTypeError
static typedef of
Types
Thrown when invalid parameters are sent to the constructor.