runty-logger
Pure, lightweight, multi-level, flexible logger
Table of Contents
Install
This project uses node and npm.
$ npm install runty-logger$ # OR $ yarn add runty-logger
Usage
const createLogger = // All arguments are optional. Shown with defaultsconst log = log // will not do anythinglog // will not do anythinglog // 12:37:33 INFO - clog // 12:37:33 WARN - dlog // 12:37:33 ERROR - elog // 12:37:33 FATAL - f const someBool = trueconst someObject = foo: 5 // Returns value provided for cleaning loggingif log // 12:37:33 INFO - Some bool set: true log // 12:37:33 INFO - Ran! if log > 1 // 12:37:33 INFO - someObject.foo 5 log // 12:37:33 INFO - Ran!
Contribute
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
License
MIT