[mirotalksfu] - improve Logger
هذا الالتزام موجود في:
@@ -9,17 +9,18 @@ module.exports = class Logger {
|
||||
|
||||
debug(msg, op = '') {
|
||||
if (this.debugOn === false) return;
|
||||
let dataTime = new Date().toISOString().replace(/T/, ' ').replace(/Z/, '');
|
||||
console.log('[' + dataTime + '] [' + this.appName + '] ' + msg, op);
|
||||
console.log('[' + this.getDataTime() + '] [' + this.appName + '] ' + msg, op);
|
||||
}
|
||||
|
||||
warn(msg, op = '') {
|
||||
let dataTime = new Date().toISOString().replace(/T/, ' ').replace(/Z/, '');
|
||||
console.warn('[' + dataTime + '] [' + this.appName + '] ' + msg, op);
|
||||
console.warn('[' + this.getDataTime() + '] [' + this.appName + '] ' + msg, op);
|
||||
}
|
||||
|
||||
error(msg, op = '') {
|
||||
let dataTime = new Date().toISOString().replace(/T/, ' ').replace(/Z/, '');
|
||||
console.error('[' + dataTime + '] [' + this.appName + '] ' + msg, op);
|
||||
console.error('[' + this.getDataTime() + '] [' + this.appName + '] ' + msg, op);
|
||||
}
|
||||
|
||||
getDataTime() {
|
||||
return new Date().toISOString().replace(/T/, ' ').replace(/Z/, '');
|
||||
}
|
||||
};
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم