Module: logger

Logger module for npac

Methods

(static) addLogger(ctx, next)

Create an adapter function that adds a default logger to the context.

Parameters:
Name Type Description
ctx Object

The actual context

next function

Error-first callback function to pass the result partial context extended with the logger.

see also: the npac.startup process description.

(inner) makeWinstonLogger(config) → {Object}

Make a winston logger described by the config parameters.

This adapter uses the winston logger library. It uses the default levels: error: 0, warn: 1, info: 2, verbose: 3, debug: 4, silly: 5

Parameters:
Name Type Description
config Object

The configuration of the logger The structure of the config object:

Returns:
  • The logger object
Type
Object