Skip to content

Instantly share code, notes, and snippets.

@ekashida
Forked from andrewvc/funkyclosure.js
Created May 20, 2011 19:37
Show Gist options
  • Save ekashida/983617 to your computer and use it in GitHub Desktop.
Save ekashida/983617 to your computer and use it in GitHub Desktop.
from node-streamlogger.js
for (var logLevel in this.levelList) {
this[logLevel] = (function(logLevel) {
return function (message,callback) {
this.logAtLevel(message, this.levelList[logLevel], callback);
}
})(logLevel);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment