日志:短链接记录

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

@@ -47,7 +47,21 @@ export default (appInfo: EggAppInfo) => {
dir: path.join(appInfo.baseDir, '/app/public'),
};
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}`,