日志:修改日志配置

This commit is contained in:
luying
2022-01-07 18:08:33 +08:00
parent 7284b22544
commit e579457a39
8 changed files with 47 additions and 31 deletions
+15 -4
View File
@@ -62,8 +62,13 @@ pm2Master.args.push('port='+masterConfig.port);
pm2Master.args.push('env='+envType);
pm2Master.args.push('mode=stand-alone');
pm2Master.cwd= cwd;
pm2Master.out_file = './logs/'+masterConfig.id+"_app.log";
pm2Master.error_file='./logs/'+masterConfig.id+'_error.log';
if(envType == 'sq1') {
pm2Master.out_file = '/zyz_logs/pm2/'+masterConfig.id+"_app.log";
pm2Master.error_file='/zyz_logs/pm2/'+masterConfig.id+'_error.log';
} else {
pm2Master.out_file = './logs/'+masterConfig.id+'_app.log'
pm2Master.error_file='./logs/'+masterConfig.id+'_error.log';
}
resultJson.apps.push(pm2Master);
//生成当个服务器的配置
@@ -91,8 +96,14 @@ for(serverType in serversConfig)
}
appPm2Config.cwd= cwd;
appPm2Config.out_file = './logs/'+ singleServer.id+'_app.log';
appPm2Config.error_file = './logs/'+singleServer.id+'_error.log';
if(envType == 'sq1') {
appPm2Config.out_file = '/zyz_logs/pm2/'+singleServer.id+"_app.log";
appPm2Config.error_file='/zyz_logs/pm2/'+singleServer.id+'_error.log';
} else {
appPm2Config.out_file = './logs/'+singleServer.id+'_app.log';
appPm2Config.error_file = './logs/'+singleServer.id+'_error.log';
}
resultJson.apps.push(appPm2Config);
}