改变时间颜色

https://github.com/Suwings/MCSManager/pull/131
This commit is contained in:
lupohan44 2019-10-06 13:34:07 +08:00 committed by GitHub
parent 14c47ca5a4
commit e7f943679a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ MCSERVER.log = function () {
MCSERVER.infoLog = (info, value, colors = false) => {
var date = new Date();
let infoStr = colors ? info : info.green;
console.log('[ '+date.getFullYear()+'-'+date.getMonth()+1+'-'+date.getDate()+' '+date.getHours()+':'+date.getMinutes()+':'+date.getSeconds()+' ] [ ' + infoStr + ' ] ' + (value + '').white);
console.log('[ '+(date.getFullYear()+'-'+date.getMonth()+1+'-'+date.getDate()).green+' '+(date.getHours()+':'+date.getMinutes()+':'+date.getSeconds()).blue+' ] [ ' + infoStr + ' ] ' + (value + '').white);
}
//error 报告器