Closed tuohuang closed 9 months ago
midwayLogger: { default: { transports: { file: { maxSize: '100m', // 也可以配置数字,表示最多保留日志文件的个数。 maxFiles: '10d', }, error: { maxSize: '100m', maxFiles: '10d', }, } }, clients: { coreLogger: { fileLogName: 'core.log', }, appLogger: { fileLogName: 'app.log', }, // bull的日志文件名 bullLogger: { fileLogName: 'bull.log', }, customLogger: { fileLogName: 'custom.log', contextFormat: (info) => { const ctx = info.ctx; console.log("++++++++++++++++") console.log(`${info.LEVEL} ${info.timestamp} ${info.message}`) return `${info.LEVEL} ${info.timestamp} ${info.message}`; } }, } },