Critical log startup and shutdown.
These messages should always be logged, even if log level is set to WARN or ERROR.
This commit is contained in:
parent
fba9fe5b0a
commit
9fe6eb8e52
4
vspd.go
4
vspd.go
@ -52,7 +52,7 @@ func run(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show version at startup.
|
// Show version at startup.
|
||||||
log.Infof("Version %s (Go version %s %s/%s)", version.String(), runtime.Version(),
|
log.Criticalf("Version %s (Go version %s %s/%s)", version.String(), runtime.Version(),
|
||||||
runtime.GOOS, runtime.GOARCH)
|
runtime.GOOS, runtime.GOARCH)
|
||||||
|
|
||||||
if cfg.netParams == &mainNetParams &&
|
if cfg.netParams == &mainNetParams &&
|
||||||
@ -70,7 +70,7 @@ func run(ctx context.Context) error {
|
|||||||
|
|
||||||
// WaitGroup for services to signal when they have shutdown cleanly.
|
// WaitGroup for services to signal when they have shutdown cleanly.
|
||||||
var shutdownWg sync.WaitGroup
|
var shutdownWg sync.WaitGroup
|
||||||
defer log.Info("Shutdown complete")
|
defer log.Criticalf("Shutdown complete")
|
||||||
|
|
||||||
// Open database.
|
// Open database.
|
||||||
db, err := database.Open(ctx, &shutdownWg, cfg.dbPath, cfg.BackupInterval, maxVoteChangeRecords)
|
db, err := database.Open(ctx, &shutdownWg, cfg.dbPath, cfg.BackupInterval, maxVoteChangeRecords)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user