File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import (
21
21
const Subsystem = "LOOPD"
22
22
23
23
var (
24
- logWriter * build.RotatingLogWriter
25
24
log btclog.Logger
26
25
interceptor signal.Interceptor
27
26
)
30
29
func SetupLoggers (root * build.RotatingLogWriter , intercept signal.Interceptor ) {
31
30
genLogger := genSubLogger (root , intercept )
32
31
33
- logWriter = root
34
32
log = build .NewSubLogger (Subsystem , genLogger )
35
33
interceptor = intercept
36
34
Original file line number Diff line number Diff line change @@ -180,13 +180,6 @@ func Run(rpcCfg RPCConfig) error {
180
180
os .Exit (0 )
181
181
}
182
182
183
- // Special show command to list supported subsystems and exit.
184
- if config .DebugLevel == "show" {
185
- fmt .Printf ("Supported subsystems: %v\n " ,
186
- logWriter .SupportedSubsystems ())
187
- os .Exit (0 )
188
- }
189
-
190
183
// Validate our config before we proceed.
191
184
if err := Validate (& config ); err != nil {
192
185
return err
@@ -205,6 +198,14 @@ func Run(rpcCfg RPCConfig) error {
205
198
logWriter := build .NewRotatingLogWriter ()
206
199
SetupLoggers (logWriter , shutdownInterceptor )
207
200
201
+ // Special show command to list supported subsystems and exit.
202
+ if config .DebugLevel == "show" {
203
+ fmt .Printf ("Supported subsystems: %v\n " ,
204
+ logWriter .SupportedSubsystems ())
205
+
206
+ os .Exit (0 )
207
+ }
208
+
208
209
err = logWriter .InitLogRotator (
209
210
filepath .Join (config .LogDir , defaultLogFilename ),
210
211
config .MaxLogFileSize , config .MaxLogFiles ,
You can’t perform that action at this time.
0 commit comments