Browse Source

fix go-lint

pull/190/head
yedf2 4 years ago
parent
commit
5e491a9ced
  1. 4
      dtmcli/logger/log.go

4
dtmcli/logger/log.go

@ -57,7 +57,7 @@ func InitLog2(level string, outputs string, logRotationEnable int64, logRotateCo
} }
if logRotationEnable != 0 { if logRotationEnable != 0 {
setupLogRotation(outputPaths, logRotateConfigJSON) setupLogRotation(logRotateConfigJSON)
} }
config := loadConfig(level) config := loadConfig(level)
@ -76,7 +76,7 @@ func (*lumberjackSink) Sync() error {
} }
// setupLogRotation initializes log rotation for a single file path target. // setupLogRotation initializes log rotation for a single file path target.
func setupLogRotation(logOutputs []string, logRotateConfigJSON string) { func setupLogRotation(logRotateConfigJSON string) {
err := zap.RegisterSink("lumberjack", func(u *url.URL) (zap.Sink, error) { err := zap.RegisterSink("lumberjack", func(u *url.URL) (zap.Sink, error) {
var conf lumberjackSink var conf lumberjackSink
err := json.Unmarshal([]byte(logRotateConfigJSON), &conf) err := json.Unmarshal([]byte(logRotateConfigJSON), &conf)

Loading…
Cancel
Save