How to use the logform.format.errors function in logform

To help you get started, we’ve selected a few logform examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github namshi / winston-graylog2 / test / e2e.js View on Github external
},
};

const logger = winston.createLogger({
  level: 'debug',
  levels: {
    emerg: 0,
    alert: 1,
    crit: 2,
    error: 3,
    warn: 4,
    notice: 5,
    info: 6,
    debug: 7,
  },
  format: format.combine(format.errors({stack: true}), format.metadata()),
  transports: [new WinstonGraylog2(options)],
});

socket.on('listening', () => {
  let emergCheck;
  let alertCheck;
  let critCheck;
  let errorCheck;
  let warnCheck;
  let noticeCheck;
  let infoCheck;
  let debugCheck;
  const listeners = [];
  const notifyListeners = (msg) => {
    listeners.forEach((listener) => listener(msg));
  };

logform

An mutable object-based log format designed for chaining & objectMode streams.

MIT
Latest version published 4 months ago

Package Health Score

89 / 100
Full package analysis