日志:log4js添加部分输出

This commit is contained in:
luying
2021-07-17 19:02:31 +08:00
parent 3848c1e141
commit 7c735bfbfc
6 changed files with 151 additions and 10 deletions

View File

@@ -84,6 +84,24 @@ module.exports = {
'type': 'basic'
},
'backups': 5
},
'app': {
'type': 'file',
'filename': '${opts:base}/../logs/app/app.log',
'maxLogSize': 1048576,
'layout': {
'type': 'basic'
},
'backups': 5
},
'error': {
'type': 'file',
'filename': '${opts:base}/../logs/app/error.log',
'maxLogSize': 1048576,
'layout': {
'type': 'basic'
},
'backups': 5
}
},
@@ -124,6 +142,18 @@ module.exports = {
'appenders': ['pinus-rpc'],
'level': 'debug'
},
'pinus': {
'appenders': ['console', 'pinus', 'app'],
'level': 'debug'
},
'info': {
'appenders': ['console', 'app'],
'level': 'debug'
},
'err': {
'appenders': ['console', 'error'],
'level': 'debug'
}
},