Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

winston-journald

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-journald

A journald transport for winston

latest
Source
npmnpm
Version
0.5.0
Version published
Maintainers
1
Created
Source

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

Author: Romain CATOIO

Keywords

logging

FAQs

Package last updated on 25 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts