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