Authored by 毕凯

logger

... ... @@ -72,17 +72,25 @@ module.exports = {
},
loggers: {
infoFile: {
close: true,
name: 'info',
level: 'info',
filename: '/Data/log/yoho-yohobuy-wap/info.log',
maxFiles: 7
filename: 'logs/info.log',
maxFiles: 7,
timestamp() {
return new Date().toString();
}
},
errorFile: {
close: true,
name: 'error',
level: 'error',
filename: '/Data/log/yoho-yohobuy-wap/error.log',
filename: 'logs/error.log',
handleExceptions: true,
maxFiles: 7
maxFiles: 7,
timestamp() {
return new Date().toString();
}
},
console: {
level: 'debug',
... ... @@ -241,14 +249,20 @@ if (isProduction) {
name: 'info',
level: 'info',
filename: '/Data/log/yoho-yohobuy-wap/info.log',
maxFiles: 7
maxFiles: 7,
timestamp() {
return new Date().toString();
}
},
errorFile: {
name: 'error',
level: 'error',
filename: '/Data/log/yoho-yohobuy-wap/error.log',
handleExceptions: true,
maxFiles: 7
maxFiles: 7,
timestamp() {
return new Date().toString();
}
},
console: {
close: true,
... ...