日志:短链接记录
This commit is contained in:
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user