0.6.1 • Published 9 years ago

color-logs v0.6.1

Weekly downloads
102
License
BSD-2-Clause
Repository
github
Last release
9 years ago

#Color-logs

###Node.js module to get better logs.

Color-logs works as console.log logger on Node.js but with extra data and colors to make easier find the lines on your log files.

Installation

npm install color-logs

Usage

You can use all of them as console.log(), send just a string, multiple strings or mix strings and objects.

var log = require('color-logs.js')(isLogEnabled, isDebugEnabled, __filename);

log.debug(...);
log.info(...);
log.warning(...);
log.error(...);

Sample

  • 06 Jun 15:40:36.045 - file_name.js DEBUG: message {object to value also} -> BLUE
  • 06 Jun 15:40:36.045 - file_name.js INFO: message {object to value also} -> GREEN
  • 06 Jun 15:40:36.045 - file_name.js WARNING: message {object to value also} -> YELLOW
  • 06 Jun 15:40:36.045 - file_name.js ERROR: message {object to value also} -> RED

Color-logs

Update jan-2015

by PauloVelho You can set the color of the output on the fly. So, if you want to highlit any specific debug, it's possible using the function log.colors()

Colors available: black, red, green, yellow, blue, cyan, magenta, white

Sample

	log.colors("cyan").error("some error message") // outputs *some error message* in cyan
	log.colors("black", "red").debug("some debug") // outputs *some debug* in black with a red background

Testing

npm i

npm test

Release History

  • 0.6.0 Added colorize function by PauloVelho

  • 0.5.3 Fixed path file on log for windows

  • 0.5.0 Added support for lowercase funcions name

  • 0.2.3 Simply update readme image

  • 0.2.2 Enabled again test

  • 0.2.1 Disabled test

  • 0.2.0 Fixed test and enabled and disable bug and log

  • 0.1.0 Initial release

0.6.1

9 years ago

0.6.0

9 years ago

0.5.3

9 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.2.71

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago