Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

triple-beam

winstonjs32.9mMIT1.4.1TypeScript support: definitely-typed

Definitions of levels for logging purposes & shareable Symbol constants.

winstonjs, winston, logging, logform, symbols, logs, levels

readme

triple-beam

Definitions of levels for logging purposes & shareable Symbol constants.

Usage

const { LEVEL } = require('triple-beam');
const colors = require('colors/safe');

const info = {
  [LEVEL]: 'error',
  level: 'error',
  message: 'hey a logging message!'
};

// Colorize your log level!
info.level = colors.green(info.level);

// And still have an unmutated copy of your level!
console.log(info.level === 'error');  // false
console.log(info[LEVEL] === 'error'); // true

Tests

Tests are written with mocha, assume, and nyc. They can be run with npm:

npm test
LICENSE: MIT
AUTHOR: Charlie Robbins

changelog

CHANGELOG

1.3.0

  • [#4] Add SPLAT symbol.
  • [#3] Add linting & TravisCI.

1.2.0

  • [#2] Move configs from winston.config.{npm,syslog,npm} into triple-beam.

1.1.0

  • Expose a MESSAGE Symbol, nothing more.

1.0.1

  • Use Symbol.for because that is how they work apparently.

1.0.0

  • Initial version. Defines a LEVEL Symbol, nothing more.