日志:修改日志配置
This commit is contained in:
@@ -88,11 +88,11 @@ module.exports = {
|
|||||||
'app': {
|
'app': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/../logs/app/app.log',
|
'filename': '${opts:base}/../logs/app/app.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 10485760,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
},
|
},
|
||||||
'backups': 5
|
'backups': 15
|
||||||
},
|
},
|
||||||
'error': {
|
'error': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
@@ -143,7 +143,7 @@ module.exports = {
|
|||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'pinus': {
|
'pinus': {
|
||||||
'appenders': ['console', 'pinus'],
|
'appenders': ['pinus'],
|
||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'info': {
|
'info': {
|
||||||
|
|||||||
@@ -88,11 +88,11 @@ module.exports = {
|
|||||||
'app': {
|
'app': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/../logs/app/app.log',
|
'filename': '${opts:base}/../logs/app/app.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 10485760,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
},
|
},
|
||||||
'backups': 5
|
'backups': 15
|
||||||
},
|
},
|
||||||
'error': {
|
'error': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
@@ -143,7 +143,7 @@ module.exports = {
|
|||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'pinus': {
|
'pinus': {
|
||||||
'appenders': ['console', 'pinus'],
|
'appenders': ['pinus'],
|
||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'info': {
|
'info': {
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ module.exports = {
|
|||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'pinus': {
|
'pinus': {
|
||||||
'appenders': ['console', 'pinus'],
|
'appenders': ['pinus'],
|
||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'info': {
|
'info': {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'con-log': {
|
'con-log': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/logs/con-log-${opts:serverId}.log',
|
'filename': '/zyz_logs/log4js/con-log-${opts:serverId}.log',
|
||||||
'pattern': 'connector',
|
'pattern': 'connector',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 1048576,
|
||||||
'layout': {
|
'layout': {
|
||||||
@@ -15,7 +15,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'rpc-log': {
|
'rpc-log': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/logs/rpc-log-${opts:serverId}.log',
|
'filename': '/zyz_logs/log4js/rpc-log-${opts:serverId}.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 1048576,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
@@ -24,7 +24,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'forward-log': {
|
'forward-log': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/logs/forward-log-${opts:serverId}.log',
|
'filename': '/zyz_logs/log4js/forward-log-${opts:serverId}.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 1048576,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
@@ -33,7 +33,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'rpc-debug': {
|
'rpc-debug': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/logs/rpc-debug-${opts:serverId}.log',
|
'filename': '/zyz_logs/log4js/rpc-debug-${opts:serverId}.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 1048576,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
@@ -42,7 +42,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'crash-log': {
|
'crash-log': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/logs/crash.log',
|
'filename': '/zyz_logs/log4js/crash.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 1048576,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
@@ -51,7 +51,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'admin-log': {
|
'admin-log': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/logs/admin.log',
|
'filename': '/zyz_logs/log4js/admin.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 1048576,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
@@ -60,7 +60,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'pinus': {
|
'pinus': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/logs/pinus-${opts:serverId}.log',
|
'filename': '/zyz_logs/log4js/pinus-${opts:serverId}.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 1048576,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
@@ -69,7 +69,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'pinus-admin': {
|
'pinus-admin': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/logs/pinus-admin.log',
|
'filename': '/zyz_logs/log4js/pinus-admin.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 1048576,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
@@ -78,7 +78,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'pinus-rpc': {
|
'pinus-rpc': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/logs/pinus-rpc-${opts:serverId}.log',
|
'filename': '/zyz_logs/log4js/pinus-rpc-${opts:serverId}.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 1048576,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
@@ -87,16 +87,16 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'app': {
|
'app': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/../logs/app/app.log',
|
'filename': '/zyz_logs/sls/app.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 10485760,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
},
|
},
|
||||||
'backups': 5
|
'backups': 15
|
||||||
},
|
},
|
||||||
'error': {
|
'error': {
|
||||||
'type': 'file',
|
'type': 'file',
|
||||||
'filename': '${opts:base}/../logs/app/error.log',
|
'filename': '/zyz_logs/sls/error.log',
|
||||||
'maxLogSize': 1048576,
|
'maxLogSize': 1048576,
|
||||||
'layout': {
|
'layout': {
|
||||||
'type': 'basic'
|
'type': 'basic'
|
||||||
@@ -107,7 +107,7 @@ module.exports = {
|
|||||||
|
|
||||||
'categories': {
|
'categories': {
|
||||||
'default': {
|
'default': {
|
||||||
'appenders': ['console'],
|
'appenders': ['console', 'pinus'],
|
||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'con-log': {
|
'con-log': {
|
||||||
@@ -143,7 +143,7 @@ module.exports = {
|
|||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'pinus': {
|
'pinus': {
|
||||||
'appenders': ['console'],
|
'appenders': ['pinus'],
|
||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'info': {
|
'info': {
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ module.exports = {
|
|||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'pinus': {
|
'pinus': {
|
||||||
'appenders': ['console', 'pinus'],
|
'appenders': ['pinus'],
|
||||||
'level': 'debug'
|
'level': 'debug'
|
||||||
},
|
},
|
||||||
'info': {
|
'info': {
|
||||||
|
|||||||
@@ -62,8 +62,13 @@ pm2Master.args.push('port='+masterConfig.port);
|
|||||||
pm2Master.args.push('env='+envType);
|
pm2Master.args.push('env='+envType);
|
||||||
pm2Master.args.push('mode=stand-alone');
|
pm2Master.args.push('mode=stand-alone');
|
||||||
pm2Master.cwd= cwd;
|
pm2Master.cwd= cwd;
|
||||||
pm2Master.out_file = './logs/'+masterConfig.id+"_app.log";
|
if(envType == 'sq1') {
|
||||||
pm2Master.error_file='./logs/'+masterConfig.id+'_error.log';
|
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);
|
resultJson.apps.push(pm2Master);
|
||||||
|
|
||||||
//生成当个服务器的配置
|
//生成当个服务器的配置
|
||||||
@@ -91,8 +96,14 @@ for(serverType in serversConfig)
|
|||||||
}
|
}
|
||||||
|
|
||||||
appPm2Config.cwd= cwd;
|
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);
|
resultJson.apps.push(appPm2Config);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,8 +91,15 @@ for (serverType in serversConfig) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
appPm2Config.cwd = cwd;
|
appPm2Config.cwd = cwd;
|
||||||
appPm2Config.out_file = './logs/' + singleServer.id + '_app.log';
|
|
||||||
appPm2Config.error_file = './logs/' + singleServer.id + '_error.log';
|
|
||||||
|
if(masterEnvType == '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);
|
resultJson.apps.push(appPm2Config);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { WAR_TYPE } from "..";
|
|
||||||
|
|
||||||
export const TURBO_CORE_URL = 'https://coresrv.tgamebox.cn';
|
export const TURBO_CORE_URL = 'https://coresrv.tgamebox.cn';
|
||||||
export const APP_ID = 'AXaXmIHPs9eONvzrBesD8aSKQNXYdALF';
|
export const APP_ID = 'AXaXmIHPs9eONvzrBesD8aSKQNXYdALF';
|
||||||
export const TURBO_PARM_SECRET = 'ipqw05du6ob4x130w89t31yrqd6xs005zzltcmg2zpqnvrjp1s';
|
export const TURBO_PARM_SECRET = 'ipqw05du6ob4x130w89t31yrqd6xs005zzltcmg2zpqnvrjp1s';
|
||||||
|
|||||||
Reference in New Issue
Block a user