Skip to content
This repository was archived by the owner on Jul 25, 2021. It is now read-only.
/ high-console Public archive

Configurable browser logger, high-console can be used for logging purposes, status reporting. It supports colored messages out of the box.

License

Notifications You must be signed in to change notification settings

tusharf5/high-console

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

high-console

🎉🎉🎉🎉 Use same logger for both Browser and Node with zero config out of the box 🎉🎉🎉🎉

Configurable browser and node logger with same API, high-console can be used for logging purposes in a pleasant way and status reporting. It supports colored messages out of the box.

Features:

  • Support condintional logging based on the environment.
  • Zero Dependency
  • Supports colored console statements.
  • Comes with common utils like debug, error, warn, success out of the box.
  • All styles are configurable. [TODO]

High Console

Quickstart - npm

npm install high-console

Or using yarn

yarn add high-console

Then require it in your module ...

var debug = require('high-console').debug;

OR using ES6 imports

import { debug, error, HighConsole } from 'high-console';

API

debugging

import { debug, error, success, warn } from 'high-console';

debug('Message to Debug', {userId: '1234Abdsksk'});
error('Error Message', {userId: '1234Abdsksk'});
success('Success Message', {userId: '1234Abdsksk'});
warn('Warn Message', {userId: '1234Abdsksk'});

Disabled on production

// project entry file

import { HighConsole } from 'high-console';

new HighConsole({ enabled: process.env.NODE_ENV !== 'production' });

Global Config

config = { 
  upperCase: true, // uppercase the message to the logger
  enableLabel: true, // Enable the labels (⚠, ✔)
  enabled: true // enable logging to the console
}

new HighConsole(config);

About

Configurable browser logger, high-console can be used for logging purposes, status reporting. It supports colored messages out of the box.

Resources

License

Stars

Watchers

Forks

Packages

No packages published