Skip to content

Instantly share code, notes, and snippets.

@akisute
Created March 12, 2009 23:38
Show Gist options
  • Save akisute/78356 to your computer and use it in GitHub Desktop.
Save akisute/78356 to your computer and use it in GitHub Desktop.
var _global = this;
(function() {
// constructor
function Logger() {
}
_global.Logger = Logger;
// _global.getLogger = function(){return Logger;};
// class methods and constants
Logger.LEVEL_DEBUG = 0;
Logger.LEVEL_INFO = 1;
Logger.LEVEL_WARN = 2;
Logger.LEVEL_ERROR = 3;
Logger.logLevel = Logger.LEVEL_DEBUG;
Logger.log = function (o) {
if (console) {
console.log(o);
}
}
// public methods
// private methods
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment