#18 JS EVENT LOGGER
Looking for a lightweight event logger for JavaScript? look no further then Loglevel.
Loglevel is a minimal lightweight simple logging library for JavaScript. Loglevel replaces console.log() with level-based logging and filtering, with none of console’s downsides.
It’s a bare bones reliable everyday logging library. It does not do fancy things, it does not let you reconfigure appenders or add complex log filtering rules or boil tea (more’s the pity), but it does have all the core functionality that you actually use…
In this example I have implemented Loglevel directly into my browser page:
1 2 3 4 5 6 7 |
<script src="loglevel.min.js"></script> <script> function Loginfo(){ log.setLevel('info');//2 log.info("log info"); } </script> |