日志分割

This commit is contained in:
gaoshuaixing
2023-05-06 18:27:26 +08:00
parent 2c0808d4ee
commit f6a9821228
2 changed files with 10 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
'use strict';
const dayjs = require('dayjs');
const path = require('path');
/**
@@ -65,8 +64,15 @@ module.exports = (appInfo) => {
* ee框架日志
*/
config.logger = {
appLogName: `ee-${dayjs().format('YYYY-MM-DD')}.log`,
errorLogName: `ee-error-${dayjs().format('YYYY-MM-DD')}.log`
encoding: 'utf8',
level: 'INFO',
outputJSON: false,
buffer: true,
enablePerformanceTimer: false,
rotator: 'day',
appLogName: 'ee.log',
coreLogName: 'ee-core.log',
errorLogName: 'ee-error.log'
}
/**