winston
A journald transport for winston.
Motivation
tldr;?
: To break the winston codebase into small modules that work
together.
The winston codebase has been growing significantly with contributions and other logging transports. This is awesome. However, taking a ton of additional dependencies just to do something simple like logging to the Console and a File is overkill.
Usage
var winston = ;/*** Requiring `winston-journald` will expose* `winston.transports.journald`*/Journald;winston;
The options
parameter (optional) can contain the following attributes:
level
: describing the minimum level used to send logs to journald. For example is you set options.level toinfo
all logs will be sent to journald but thedebug
ones.concatMetaToMessage
: Concatenate the event meta data to the message.fields
: Default fields passed to node-sytemd-journald when creating a new logger instance. This can be used to set theSYSLOG_FACILITY
andSYSLOG_IDENTIFIER
fields.
Installation
$ npm install winston$ npm install winston-journald