loopd: nil-pointer bug when showing subsystems

pull/560/head
ziggie 1 year ago
parent 7f19c43047
commit 172c076c4c
No known key found for this signature in database
GPG Key ID: 1AFF9C4DCED6D666

@ -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,

Loading…
Cancel
Save