日志:短链接记录

This commit is contained in:
luying
2021-07-27 16:56:57 +08:00
parent ff36c4b361
commit 7bc4ff4577
20 changed files with 244 additions and 9 deletions

View File

@@ -53,7 +53,22 @@ export default (appInfo: EggAppInfo) => {
appSecret: 'a48ad5ca44e2d02cbd7f4c0326fa3101',
error_log: [ '/root/logs/zyz/zyz-web.log', '/root/logs/zyz/common-error.log', '/root/logs/zyz/egg-agent.log' ],
};
config.customLogger = {
linkLogger: {
file: path.join(appInfo.root, 'logs/web-server/link-log.log'),
formatter(meta) {
return `[${meta.level}] [${meta.date}] ${meta.message}`;
},
},
};
config.logrotator = {
filesRotateBySize: [
path.join(appInfo.root, 'logs/link-log.log'),
],
maxFileSize: 1024,
};
// add your special config in here
const bizConfig = {
sourceUrl: `https://github.com/eggjs/examples/tree/master/${appInfo.name}`,