log-utils

Basic logging utils: colors, symbols and timestamp.
Install
Install with npm:
$ npm install --save log-utils
All module dependencies are tiny and are lazily evaluated, this takes around ~1 millisecond to load.
Usage
var log = require('log-utils');
API
Error symbol.
Example
console.log(log.symbol.error);
Info symbol.
Example
console.log(log.symbol.info);
Success symbol.
Example
console.log(log.symbol.success);
Warning symbol.
Example
console.log(log.symbol.warning);
Get a red error symbol.
Example
console.log(log.error);
Get a cyan info symbol.
Example
console.log(log.info);
Get a green success symbol.
Example
console.log(log.success);
Get a yellow warning symbol.
Example
console.log(log.warning);
Get a formatted timestamp.
Example
console.log(log.timestamp);
Log a white success message prefixed by a green check.
Example
log.ok('Alright!');
Make the given text bold and underlined.
Example
console.log(log.heading('foo'));
console.log(log.heading('foo', 'bar'));
Colors
Available colors from ansi-colors:
.bgblack
.bgblue
.bgcyan
.bggreen
.bgmagenta
.bgred
.bgwhite
.bgyellow
.black
.blue
.bold
.cyan
.dim
.gray
.green
.grey
.hidden
.inverse
.italic
.magenta
.red
.reset
.strikethrough
.underline
.white
.yellow
Changes
v0.2.0 (2016-07-16)
removed
: all spinner methods
v0.1.5 (2016-07-16)
added
: .header
method
fixed
: .ok
method, so that whitespace is respected
Related projects
You might also be interested in these projects:
Contributing
This document was generated by verb-readme-generator (a verb generator), please don't edit directly. Any changes to the readme must be made in .verb.md. See Building Docs.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Or visit the verb-readme-generator project to submit bug reports or pull requests for the readme layout template.
Building docs
(This document was generated by verb-readme-generator (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
Generate readme and API documentation with verb:
$ npm install -g verb verb-readme-generator && verb
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert.
Released under the MIT license.
This file was generated by verb, v0.9.0, on July 11, 2016.