Skip to content

Commit 4616c96

Browse files
committed
chore: log entries
1 parent c05352b commit 4616c96

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cmd/node/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ func main() {
5858
}
5959

6060
if err := run(ctx, cancel, conf, stat, log); err != nil {
61-
log.Fataln("failed to run", obskit.Error(err))
61+
log.Fataln("Failed to run", obskit.Error(err))
6262
os.Exit(1)
6363
}
6464
}
6565

6666
func run(ctx context.Context, cancel func(), conf *config.Config, stat stats.Stats, log logger.Logger) error {
67+
defer log.Infon("Service terminated")
6768
defer cancel()
6869

6970
cloudStorage, err := cloudstorage.GetCloudStorage(conf, log)
@@ -118,6 +119,7 @@ func run(ctx context.Context, cancel func(), conf *config.Config, stat stats.Sta
118119
go func() {
119120
defer wg.Done()
120121
<-ctx.Done()
122+
log.Infon("Terminating service")
121123
service.Close() // TODO test graceful shutdown
122124
}()
123125

internal/cache/badger/badger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type hasher interface {
3232
)
3333
GetKeysByHashRangeWithIndexes(keys []string) (
3434
map[uint32][]string, // itemsByHashRange
35-
map[string]int, // indexes
35+
map[string]int, // indexes
3636
error,
3737
)
3838
}

0 commit comments

Comments
 (0)