0.4.2 ā€¢ Published 6 years ago

high-console v0.4.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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.
  • All styles are configurable. TODO
  • Supports colored console statements.
  • Comes with common utils like debug, error, warn, success out of the box.

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);
0.4.2

6 years ago

0.4.1

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago