winstonjs/triple-beam

Definitions of levels for logging purposes & shareable Symbol constants.

JavaScript

26

32 commits

updated Jul 4, 2024

See the code

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

winstonjs/triple-beam

Definitions of levels for logging purposes & shareable Symbol constants.

JavaScript

26

32 commits

updated Jul 4, 2024

See the code

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

Project health

Overall

2.9/10

Maintained

0/10

Code review

1/10
OpenSSF Scorecard

Latest release

1.4.1 · Jul 10, 2023

Releases this year

0

Significant stargazers

J.D Nicholls

604 followers · starred Mar 2023