Receives log lines. The default transport writes the log line to
process.stderr, console.debug or console.log depending on what is
available in the environment.
The args are not formatted - they can be passed to util.format from
Node.js or to format exported from this module as weald/format.
Parameters
...args: any[]
Returns void
Example: Receiving log lines
importdebugfrom'weald' import { format } from'weald/format'
constlogger = debug('my-namespace', { onLog (...args: any[]) { constline = format(...args) // do something with `line` } })
Receives log lines. The default transport writes the log line to
process.stderr,console.debugorconsole.logdepending on what is available in the environment.The args are not formatted - they can be passed to
util.formatfrom Node.js or toformatexported from this module asweald/format.