lnjs
v1.0.0
Published
The natural JavaScript Logger!
Downloads
1
Readme
ln(js)
The natural log appender!
This extremely lightweight JavaScript logging library was written mostly for fun, but also for serving the purpose of providing a logger which doesn't break a script if the console object doesn't exist for some reason!
npm install lnjs
Initialise a logger with
// If using Node.js, first declare:
// var logger = require('lnjs');
var logger = new Logger(); // Logger('warn') would return one with a level of WARN
Set log level with a string representation
logger.setLevel('info');
Get the value of Euler's constant (okay my jokes are lame):
logger.e
Enjoy!