diff --git a/config.go b/config.go index dc9a1453c..fa2575d28 100644 --- a/config.go +++ b/config.go @@ -860,6 +860,18 @@ func LoadConfig(interceptor signal.Interceptor) (*Config, error) { func ValidateConfig(cfg Config, interceptor signal.Interceptor, fileParser, flagParser *flags.Parser) (*Config, error) { + // Special show command to list supported subsystems and exit. + if cfg.DebugLevel == "show" { + subLogMgr := build.NewSubLoggerManager() + + // Initialize logging at the default logging level. + SetupLoggers(subLogMgr, interceptor) + + fmt.Println("Supported subsystems", + subLogMgr.SupportedSubsystems()) + os.Exit(0) + } + // If the provided lnd directory is not the default, we'll modify the // path to all of the files and directories that will live within it. lndDir := CleanAndExpandPath(cfg.LndDir) @@ -1408,13 +1420,6 @@ func ValidateConfig(cfg Config, interceptor signal.Interceptor, fileParser, // Initialize logging at the default logging level. SetupLoggers(cfg.SubLogMgr, interceptor) - // Special show command to list supported subsystems and exit. - if cfg.DebugLevel == "show" { - fmt.Println("Supported subsystems", - cfg.SubLogMgr.SupportedSubsystems()) - os.Exit(0) - } - if cfg.MaxLogFiles != 0 { if cfg.LogConfig.File.MaxLogFiles != build.DefaultMaxLogFiles {