@provata/logger

1.0.1 • Public • Published

Provata Logger

a logger to be used in node or web environments

Usage

/* logger.js */
import initLogging from '@provata/logger';

const defaultLevels = [
    { name: 'trace', color: 'lightgray', icon: 'pencil2', consoleMethod: 'debug' },
    { name: 'debug', color: 'green', icon: 'frog', consoleMethod: 'debug' },
    { name: 'info', color: 'blue', icon: 'large_blue_circle', consoleMethod: 'debug' },
    { name: 'warn', color: 'orange', icon: 'warning', consoleMethod: 'warn' },
    { name: 'error', color: 'red', icon: 'bangbang', consoleMethod: 'warn' }
];

const defaultConfig = {
    general: 'info'
};

const logger = initLogging(defaultConfig, defaultLevels);

export default logger
import logger from 'util/logger';

const log = logger('moduleName');

log.debug('Hello World');

Readme

Keywords

none

Package Sidebar

Install

npm i @provata/logger

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mikeyt23
  • reesretuta
  • rsmith504
  • swnbills
  • rdonald
  • jscotroby
  • provatahealth
  • jlgonzalezdev
  • abraginsky
  • mmedrano
  • lancebatson
  • jhinkle
  • percy.soliz
  • dgmrtinz-staywell
  • davidguillermoguerrerolopez