2.0.5 • Published 7 years ago

gorilog v2.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Version npm MIT License

🦍 gorilog

A simple regex-categorized colorful console logger.

INSTALL

yarn add gorilog

Usage

test.js

const gl = require('gorilog')
const obj = { foo: 'foo', bar: 'bar' }
const arr = [ 0, 1, 2, 3, obj ]

function doAll(logger) {
  console.log(logger.category, logger.level)
  logger.fatal('fatal msg', arr)
  logger.error('error msg', arr)
  logger.warn ('warn msg' , arr)
  logger.info ('info msg' , arr)
  logger.debug('debug msg', arr)
  logger.trace('trace msg', arr)
}

doAll(gl())
doAll(gl('test'))
doAll(gl('model/DB'))
doAll(gl('model/Mail'))
doAll(gl('csev1'))
doAll(gl('csev2'))
doAll(gl('csev3'))
$ yarn test

output

$ yarn test2

output

AUTHOR

Hideyuki Hirauchi

LICENSE

gorilog is freely distributable under the terms of the MIT license.

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago