logyou
v0.0.3
Published
No nonsense logger with loglevels for Node
Downloads
2
Maintainers
Readme
Keep it simple and stupid logger for Node.JS
- It gives a nice colored output with date and time
- You can set the level
That's all
Installation
npm install logyou
Example
const ly = require('logyou');
// This renders 4 messages on your screen because debug is the default level
ly.d('I am a debug message in the standard color');
ly.i('I am an info message in blue');
ly.w('I am a warning message in yellow');
ly.e('I am a error message in red');
// This renders 2 messages on your screen
ly.setLevel('warn');
ly.d('I am a debug message in the standard color'); // Not rendered
ly.i('I am an info message in blue'); // Not rendered
ly.w('I am a warning message in yellow');
ly.e('I am a error message in red');
Levels
- debug: show debug, info, warnings and errors
- info: show info, warnings and errors
- warn: show warnings and errors
- error: show only errors
- no arguments: show nothing
Standard level is 'debug'
License
MIT