log_
console.log + color + prefix for node.js
Installation
npm install --save log_
Usage
var log = 'server' 'blue'; // Basic logging; // Error messageslog;
This logs the following:
[server] starting on port 8080
[server] server crashed!
Available Colors
var Log = ;console; // outputs the following 'reset': '\u001b[0m' 'bold': '\u001b[1m' 'italic': '\u001b[3m' 'underline': '\u001b[4m' 'blink': '\u001b[5m' 'black': '\u001b[30m' 'red': '\u001b[31m' 'green': '\u001b[32m' 'yellow': '\u001b[33m' 'blue': '\u001b[34m' 'magenta': '\u001b[35m' 'cyan': '\u001b[36m' 'white': '\u001b[37m'
Enabling and Disabling
var Log log; Log = ;log = ; ; Log;;log; Log;;
[server] enabled by default
[server] enable the logs again