Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clrsole

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clrsole

colorful console.log

  • 1.0.0-beta.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1K
decreased by-1.45%
Maintainers
1
Weekly downloads
 
Created
Source

clrsole

npm package

Usage


const Console = require('clrsole');

const appLogger = new Console('app');

// logging for log4j
appLogger.trace('message', 'message2', ...);
appLogger.debug('message', 'message2', ...);
appLogger.info('message', 'message2', ...);
appLogger.warn('message', 'message2', ...);
appLogger.error('message', 'message2', ...);
appLogger.fatal('message', 'message2', ...);

// changed levels
appLogger.setLevels('syslog');

// logging for syslog
appLogger.debug('message', 'message2');
appLogger.info('message', 'message2');
appLogger.notice('message', 'message2');
appLogger.warn('message', 'message2');
appLogger.error('message', 'message2');
appLogger.critical('message', 'message2');
appLogger.alert('message', 'message2');
appLogger.emergency('message', 'message2');

// The first optional param is level
appLogger.log('INFO', 'message', 'message2', ...);
appLogger.log('error', 'message', 'message2', ...);
appLogger.log('message', 'message2', ...);

Keywords

FAQs

Package last updated on 23 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc