Skip to content

Instantly share code, notes, and snippets.

@dsosby dsosby/gist:2160486
Created Mar 22, 2012

Embed
What would you like to do?
JS Logging
var loglevel = 3;
function debug(message, level) {
level = level || 1;
if ( console ) {
if ( level >= loglevel ) {
console.log(message);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.