lnd: log shutdown before closing rotator
This commit is contained in:
parent
bfcda6e205
commit
bbceec8bea
7
lnd.go
7
lnd.go
@ -93,12 +93,6 @@ var (
|
||||
// defers created in the top-level scope of a main method aren't executed if
|
||||
// os.Exit() is called.
|
||||
func lndMain() error {
|
||||
defer func() {
|
||||
if logRotatorPipe != nil {
|
||||
ltndLog.Info("Shutdown complete")
|
||||
}
|
||||
}()
|
||||
|
||||
// Load the configuration, and parse any command line options. This
|
||||
// function will also set up logging properly.
|
||||
loadedConfig, err := loadConfig()
|
||||
@ -108,6 +102,7 @@ func lndMain() error {
|
||||
cfg = loadedConfig
|
||||
defer func() {
|
||||
if logRotator != nil {
|
||||
ltndLog.Info("Shutdown complete")
|
||||
logRotator.Close()
|
||||
}
|
||||
}()
|
||||
|
Loading…
Reference in New Issue
Block a user