Use new logging util
This commit is contained in:
@@ -114,4 +114,22 @@ function isConsole(client) {
|
||||
return client.console;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function logToConsole(tempLogLevel, text) {
|
||||
if(logLevel & tempLogLevel) {
|
||||
if(tempLogLevel == LOG_ERROR) {
|
||||
console.error(text);
|
||||
} else if(tempLogLevel == LOG_WARN) {
|
||||
console.warn(text);
|
||||
} else {
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user