数数:log4js配置

This commit is contained in:
luying
2022-05-24 09:30:05 +08:00
parent 8486d3fee8
commit 6559fc8bfb
2 changed files with 16 additions and 4 deletions
+1 -2
View File
@@ -1,8 +1,7 @@
module.exports = { module.exports = {
'appenders': { 'appenders': {
'console': { 'console': {
'type': 'console', 'type': 'console'
'prefix': '${opts:serverId}'
}, },
'con-log': { 'con-log': {
'type': 'file', 'type': 'file',
+15 -2
View File
@@ -102,6 +102,17 @@ module.exports = {
'type': 'basic' 'type': 'basic'
}, },
'backups': 5 'backups': 5
},
'ta': {
'type': 'file',
'filename': '/zyz_logs/ta/log',
'pattern': 'yyyy-MM-dd-hh',
'alwaysIncludePattern': true,
'layout': {
'type': 'pattern',
'pattern': '%m',
},
} }
}, },
@@ -153,11 +164,13 @@ module.exports = {
'err': { 'err': {
'appenders': ['console', 'error'], 'appenders': ['console', 'error'],
'level': 'debug' 'level': 'debug'
},
'ta': {
'appenders': ['console', 'ta'],
'level': 'info'
} }
}, },
'prefix': '${opts:serverId} ',
'replaceConsole': true, 'replaceConsole': true,
'lineDebug': false, 'lineDebug': false,
'errorStack': true 'errorStack': true