JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18
  • Score
    100M100P100Q40278F
  • License MIT

A simple regex-categorized colorful console logger.

Package Exports

  • gorilog

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gorilog) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.