Skip to content

RoCat/winston-journald

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 = require('winston');

  /**
   * Requiring `winston-journald` will expose
   * `winston.transports.journald`
   */
  require('winston-journald').Journald;

  winston.add(winston.transports.Journald, options);

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 to info all logs will be sent to journald but the debug 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 the SYSLOG_FACILITY and SYSLOG_IDENTIFIER fields.

Installation

  $ npm install winston
  $ npm install winston-journald

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published