llogger (the lame logger)
This is yet another logger for nodejs. I departed from my previous experience with markdown friendly HTML tag names, along with the basic log functions I expect.
Stability
Using the Node.js stability index, this API is:
Stability: 2 - Unstable
Install
npm install llogger
Test (includes visual only tests that demonstrate each method)
Once installed (and you're in the logger/ directory):
npm test
Usage
// Assuming you want only 1 logger in your file, just create it// (using the world's worst variable name).var l = ; // Standard logging methods with a bit of flavor added.// Pretty much the same syntax as console.log(). ; // equivalent to l.logl;l;l;// And why not have HTML tag based methods?l;l;l;l;l;l;l;// Print an 80 character horizontal rule.l; // Increase the indentation level for this logger.l;l;l;// Decrease the indentation level for this logger.l;l; // Turn on filename and linenumber display on this logger instance.l;l;// Turn off filename and linenumber display on this logger instance.l; // Tell a logger instance to be quiet.lquiet = true;; // Turn on filename and linenumber display globally across all loggers,// overriding the logger instance setting.;// Turn off filename and linenumber display globally across all loggers,// deferring to the logger instance setting.;
Credits
Rarely is software created in a vacuum, and that includes this lame logger. In addition to the modules referenced in the package.json file, I give credit to:
- Igor Urminček (nlogger at https://github.com/igo/nlogger) for how to get caller module name and line number.