root 3bf41bf355 update 1 anno fa
..
config 3bf41bf355 update 1 anno fa
.eslintrc 3bf41bf355 update 1 anno fa
.gitattributes 3bf41bf355 update 1 anno fa
.travis.yml 3bf41bf355 update 1 anno fa
CHANGELOG.md 3bf41bf355 update 1 anno fa
LICENSE 3bf41bf355 update 1 anno fa
README.md 3bf41bf355 update 1 anno fa
index.js 3bf41bf355 update 1 anno fa
package.json 3bf41bf355 update 1 anno fa
test.js 3bf41bf355 update 1 anno fa

README.md

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