long-con
Create a console logger w/ formatting, timestamp, color, namespace
Examples
stdout, timestamp, namespaces
var longCon = ;;longCon; var log = longCon; // [Sun, 21 Apr 2013 21:33:20 GMT] myLib cache;
stderr, color, no namespace
// namespace: white foreground, red background// body: white foreground, green backgroundvar log = longCon;
See cli-color for color names.
Automatic object-specific stack trace
{ thisconsole = longCon; thislog = thisconsole; thisconsole;}Klassprototype { this; this; this;};Klassprototype { this; this; this;};Klassprototype { this;};;
Output:
Klass#foo
| foo1
| Klass#bar
| | bar1
| | Klass#baz
| | | baz
| | bar2
| foo2
See traceMethods().
Manual stack trace
var log = longCon;log;loglog;log;;
foo
| msg1
| bar
| | msg2
msg3
Installation
NPM
npm install long-con
API
License
MIT
Tests
npm test