Skip to content

Instantly share code, notes, and snippets.

@osdio
Last active August 29, 2015 14:07
Show Gist options
  • Save osdio/ef63e58900146d51faac to your computer and use it in GitHub Desktop.
Save osdio/ef63e58900146d51faac to your computer and use it in GitHub Desktop.
var slice = Array.prototype.slice
function logger(namespace) {
var name=namespace;
return function(){
arr=slice.call(arguments);
arr.unshift(name);
console.log.apply(null,arr);
} ;
}
module.exports = logger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment