A logging library that combines the simplicity and convenience of debug with the power of bunyan.
Status
Installation
Install the package via yarn:
❯ yarn add debugnyan
or via npm:
❯ npm install debugnyan --save
Usage
Create a logger by giving it a namespace and then call bunyan's log methods on the returned instance.
By default, similarly to debug's behaviour, loggers do not output any content. Each logger output can be selectively activated by using the DEBUG environment variable.
Pattern matching is based on the logger's name and it can optionally contain colons (:) to create (sub)-components properties on the logger instance.
Consider a logger named foo:bar:biz:
this creates a bunyan logger with name foo
and a bunyan (simple) child logger with property component equal to bar.