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

clog

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clog

Colorful console output in NodeJS.

  • 0.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
increased by144.44%
Maintainers
1
Weekly downloads
 
Created
Source

clog

Colorful console output for your applications in NodeJS.

  • Colors for log, info, warn and error
  • Support custom labels
  • Support display level and custom display level
  • Tiny library
  • Easy to use

Installing

GIT

$ git clone https://github.com/firejune/clog.git

NPM

$ npm install clog

Usage

var clog = require('clog');

clog('server', 'start listening on port 3000');  // custom head

clog.log('hello', 'world');                      // console.log
clog.info(['foo', 'bar']);                       // console.info
clog.warn('baz is deprecated.');                 // console.warn
clog.error('HTTP/1.1 400 Bad Request');          // console.error
clog.debug('headers', {                          // console.debug
    'Content-Type': 'text/javascript'
});

Configure

// display level configration:
clog.configure({'log level': 2});
//=> {'log': true, 'info': true, 'warn': false, 'error': false, 'debug': false}

// custom display configration:
clog.configure({
    'log level': {
        'log': true,
        'info': true,
        'warn': false,
        'error': true,
        'debug': false
    }
});
//=> {'log': true, 'info': true, 'warn': false, 'error': true, 'debug': false}

Output

output

Have fun!

License

MIT <3

Keywords

FAQs

Package last updated on 24 Aug 2012

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