src/logger

Logger module
Source:

Methods

(inner) addStreams(newStreamDefs) → {void}

Wrapper around bunyan `Logger.prototype.addStream` to add a new stream definitions. It updates all existing loggers and adds the definitions for future logger creations.
Parameters:
Name Type Description
newStreamDefs Array.<Object> bunyan stream definitions
Source:
See:
Returns:
Type
void
Example
logger.addStreams([{
 stream: process.stderr,
 level: "debug"
}]) // adds stderr output for debug level logs

(inner) build(nameopt) → {Object}

Create a bunyan logger using a given name.
Parameters:
Name Type Attributes Default Description
name String <optional>
package.name logger name
Source:
See:
Returns:
bunyan logger
Type
Object
Example
logger.build('foo') // bunyan logger with name foo