cacert-testmgr/external/ZendFramework-1.9.5/externals/dojo/util/buildscripts/jslib/logger.js
Markus Warg 8398c9048d initially import ZendFramework-1.9.5 into repository
code was modified slightly, so the code differs from the original downloadable 1.9.5 version
2010-03-31 10:12:32 +02:00

36 lines
553 B
JavaScript

var logger = {
TRACE: 0,
INFO: 1,
WARN: 2,
ERROR: 3,
level: 0,
logPrefix: "",
trace: function(message){
if(this.level <= this.TRACE){
this._print(message);
}
},
info: function(message){
if(this.level <= this.INFO){
this._print(message);
}
},
warn: function(message){
if(this.level <= this.WARN){
this._print(message);
}
},
error: function(message){
if(this.level <= this.ERROR){
this._print(message);
}
},
_print: function(message){
print((this.logPrefix ? (this.logPrefix + " ") : "") + message);
}
}