colorlogjs
A JavaScript formatted date logger. Improve console.*. Adds formatted dates in color.
Last updated a year ago by gregory80 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install colorlogjs 
SYNC missed versions from official npm registry.

Color Log JS (colorlogjs)

Colors the output of console.* (log, error, info, debug, warn). IT also adds a few more items. This will probably break in your project. Send a fix.

Installation

yarn add https://github.com/gtzilla/colorlogjs

# when added to npm.
yarn add colorlogjs

Usage

  const {colorlogjs} = require("colorlogjs");
  const console = colorlogjs.start(__filename);

  console.log("My message")
  >  Nov 18 23:14:077 command_ai.js:  {266.31757497787476} My message

Usage, Extended

  const {colorlogjs} = require("colorlogjs");
  const console = colorlogjs.start(null, {
  	log_tag:__filename,

  	log_time_format:"LL HH:MM:SSS", // moment JS friendly

  	log_tag_color:"\x1b[93m", // uses 
  });

  console.log("My message")
  >  Nov 18 23:14:077 command_ai.js:  {266.31757497787476} My message

Current Tags

  • 0.3.1                                ...           latest (a year ago)

3 Versions

  • 0.3.1                                ...           a year ago
  • 0.2.3                                ...           a year ago
  • 0.1.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (1)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |