nightingale-winston-adapter
TypeScript icon, indicating that this package has built-in type declarations

15.0.0 • Public • Published

nightingale-winston-adapter

Winston adapter handler for nightingale

Install

npm install --save nightingale nightingale-winston-adapter
npm install --save winston-logstash # example with winston-logstash

How to use

import { addGlobalHandler, Level } from 'nightingale';
import WinstonAdapterHandler from 'nightingale-winston-adapter';
import LogStash from 'winston-logstash';

// create transport
const logmaticTransport = new Logstash({
  port: 0000,
  host: 'api.logmatic.io',
  meta: { logmaticKey: 'xxxxxxxx' },
  node_name: 'my node name',
});

// add the transport as a nightingale handler for all loggers
addGlobalHandler(new WinstonAdapterHandler(logmaticTransport, Level.ALL));

/nightingale-winston-adapter/

    Package Sidebar

    Install

    npm i nightingale-winston-adapter

    Weekly Downloads

    38

    Version

    15.0.0

    License

    ISC

    Unpacked Size

    26.6 kB

    Total Files

    12

    Last publish

    Collaborators

    • churpeau