pimterry / loglevel

:ledger: Minimal lightweight logging for JavaScript, adding reliable log level methods to wrap any available console.log methods
MIT License
2.62k stars 157 forks source link

Improve first README code snippet example #118

Closed lekkas closed 6 years ago

lekkas commented 6 years ago

The first code example in the README suggests to use

var log = require('loglevel');
log.info("unreasonably simple");

Given that the default loglevel is warn (as mentioned in the README) this snippet will need some additional loglevel setup calls to actually print a message.

I guess this example could be changed to either match the default loglevel (log.warn) or include a suggested setup method (log.setDefaultLevel() maybe).

Happy to send a README PR if this is acknowledged as an actual issue

pimterry commented 6 years ago

Good point, thanks! Fixed by just moving everything to log.warn