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
|
// defers created in the top-level scope of a main method aren't executed if
|
||||||
// os.Exit() is called.
|
// os.Exit() is called.
|
||||||
func lndMain() error {
|
func lndMain() error {
|
||||||
defer func() {
|
|
||||||
if logRotatorPipe != nil {
|
|
||||||
ltndLog.Info("Shutdown complete")
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
// Load the configuration, and parse any command line options. This
|
// Load the configuration, and parse any command line options. This
|
||||||
// function will also set up logging properly.
|
// function will also set up logging properly.
|
||||||
loadedConfig, err := loadConfig()
|
loadedConfig, err := loadConfig()
|
||||||
@ -108,6 +102,7 @@ func lndMain() error {
|
|||||||
cfg = loadedConfig
|
cfg = loadedConfig
|
||||||
defer func() {
|
defer func() {
|
||||||
if logRotator != nil {
|
if logRotator != nil {
|
||||||
|
ltndLog.Info("Shutdown complete")
|
||||||
logRotator.Close()
|
logRotator.Close()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
Loading…
Reference in New Issue
Block a user