mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-11-21 03:12:10 +08:00
增加时间输出
在日志中加入时间输出
This commit is contained in:
parent
100c531b13
commit
14c47ca5a4
@ -9,8 +9,9 @@ MCSERVER.log = function () {
|
||||
}
|
||||
|
||||
MCSERVER.infoLog = (info, value, colors = false) => {
|
||||
var date = new Date();
|
||||
let infoStr = colors ? info : info.green;
|
||||
console.log('[ ' + infoStr + ' ] ' + (value + '').white);
|
||||
console.log('[ '+date.getFullYear()+'-'+date.getMonth()+1+'-'+date.getDate()+' '+date.getHours()+':'+date.getMinutes()+':'+date.getSeconds()+' ] [ ' + infoStr + ' ] ' + (value + '').white);
|
||||
}
|
||||
|
||||
//error 报告器
|
||||
@ -29,4 +30,4 @@ MCSERVER.warning = (title, msg = null) => {
|
||||
MCSERVER.infoLog('WARN'.yellow, msg.white);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user