Last updated
on 02-04-2013
at 12:00 AM


Today I’m releasing loglevel. It’s an extremely minimal logging library for JavaScript that hides all the hassle of dealing with window.console (does it exist? does it support method x?) completely and reliably, and provides only the core practical elements of logging: leveled logging calls (log.error(), log.debug()), and a setLevel() method to filter messages.

Exciting right? For more information check out the project home page at or actual github source at and start using it. Downloads (minified and full-size) are available there, and this is also in the npm registry as loglevel, and will hopefully be available in Bower and Jam soon. It’s usable as a either a CommonJS or AMD dependency, or just directly in the global scope.

This is all aiming to stay functionally minimal and lightweight, so won’t be expanding much beyond the current API (.trace(), .debug(), .info(), .warn(), .error(), .setLevel(), .enableAll(), disableAll()), but I’d still be happy to take relevant tweaks and fixes in pull requests anyway. If you look at the issues you can see the further things I’m considering doing; feel free to comment on those if you have strong feelings either way, or to open up new ones.