config+lnd+rpcserver: use log writer from cfg

This commit is contained in:
Oliver Gugger
2020-05-25 18:22:41 +02:00
parent 32b04b7ac3
commit 70772ab99b
3 changed files with 17 additions and 6 deletions

2
lnd.go
View File

@@ -190,7 +190,7 @@ type rpcListeners func() ([]*ListenerWithSignal, func(), error)
func Main(cfg *Config, lisCfg ListenerCfg, shutdownChan <-chan struct{}) error {
defer func() {
ltndLog.Info("Shutdown complete")
err := RootLogWriter.Close()
err := cfg.LogWriter.Close()
if err != nil {
ltndLog.Errorf("Could not close log rotator: %v", err)
}