diff --git a/loopd/run.go b/loopd/run.go index 151890c..0e146d0 100644 --- a/loopd/run.go +++ b/loopd/run.go @@ -179,13 +179,6 @@ func Run(rpcCfg RPCConfig) error { os.Exit(0) } - // Special show command to list supported subsystems and exit. - if config.DebugLevel == "show" { - fmt.Printf("Supported subsystems: %v\n", - logWriter.SupportedSubsystems()) - os.Exit(0) - } - // Validate our config before we proceed. if err := Validate(&config); err != nil { return err @@ -204,6 +197,13 @@ func Run(rpcCfg RPCConfig) error { logWriter := build.NewRotatingLogWriter() SetupLoggers(logWriter, shutdownInterceptor) + // Special show command to list supported subsystems and exit. + if config.DebugLevel == "show" { + fmt.Printf("Supported subsystems: %v\n", + logWriter.SupportedSubsystems()) + os.Exit(0) + } + err = logWriter.InitLogRotator( filepath.Join(config.LogDir, defaultLogFilename), config.MaxLogFileSize, config.MaxLogFiles,