lnjs

1.0.0 • Public • Published

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!

Readme

Keywords

Package Sidebar

Install

npm i lnjs

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • davidreghay