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