winston-meta-wrapper
Wraps winston logger instance to always add a set of metadata
This wrapper around winston loggers allows you to log a static or dynamic set of metadata with each log statement being executed without explicitely adding it as meta argument.
It also fixes the JSON string interpolation issue in winston
Installation
npm install winston-meta-wrapper
Usage
Wrapping Winston Logger to add static metadata
var winston = var winstonWrapper = var logger = transports: logger = logger logger
Wrapping Winston Logger to add dynamic metadata
var winston = var winstonWrapper = var logger = transports: logger = logger { return module: Math } loggerlogger
Chaining wrapped Winston Loggers
var winston = var winstonWrapper = var logger = transports: logger = logger logger = logger logger