clog
Colorful console output in NodeJS.
Last updated 14 years ago .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install clog 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.6                                ...           latest (14 years ago)

9 Versions

  • 0.1.6                                ...           14 years ago
  • 0.1.5                                ...           14 years ago
  • 0.1.4                                ...           14 years ago
  • 0.1.3                                ...           14 years ago
  • 0.1.2                                ...           14 years ago
  • 0.1.1                                ...           14 years ago
  • 0.0.3                                ...           14 years ago
  • 0.0.2                                ...           15 years ago
  • 0.0.1                                ...           15 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 5
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |