From 4f6043221c0778c940ccebcffb7fb1df16409d4e Mon Sep 17 00:00:00 2001 From: tinatwang Date: Wed, 19 Jan 2022 14:41:08 +0800 Subject: [PATCH] log config output, splite by --- conf.sample.yml | 2 +- dtmcli/logger/log.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf.sample.yml b/conf.sample.yml index 9dabfc3..55ed6ff 100644 --- a/conf.sample.yml +++ b/conf.sample.yml @@ -50,7 +50,7 @@ # LogLevel: 'info' # default: info. can be debug|info|warn|error # Log: -# Outputs: 'stderr' # default: stderr, split by |, you can append files to Outputs if need. example:'stderr|/tmp/test.log' +# Outputs: '' # default: stderr, split by ",", you can append files to Outputs if need. example:'stdout,/tmp/test.log' # RotationEnable: 0 # default: 0 # RotationConfigJson: '{}' # example: '{"maxsize": 100, "maxage": 0, "maxbackups": 0, "localtime": false, "compress": false}' diff --git a/dtmcli/logger/log.go b/dtmcli/logger/log.go index 45048b1..dde58c1 100644 --- a/dtmcli/logger/log.go +++ b/dtmcli/logger/log.go @@ -49,7 +49,7 @@ func InitLog(level string) { // InitLog2 specify advanced log config func InitLog2(level string, outputs string, logRotationEnable int64, logRotateConfigJSON string) { - outputPaths := strings.Split(outputs, "|") + outputPaths := strings.Split(outputs, ",") for i, v := range outputPaths { if logRotationEnable != 0 && v != StdErr && v != StdOut { outputPaths[i] = fmt.Sprintf("lumberjack://%s", v)