Skip to content

Commit

Permalink
refactor(monitor logging): round off to nearest second (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlucktay committed Nov 20, 2020
1 parent cfbb232 commit f669b38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ func monitor(logger *logging.Logger, cfg config) {

if !anyOnline {
logger.Log(logging.Entry{
Payload: fmt.Sprintf("Time without any online players: %s", time.Now().UTC().Sub(emptySince)),
Payload: fmt.Sprintf("Time without any online players: %s",
time.Now().UTC().Sub(emptySince).Truncate(time.Second)),
Severity: logging.Info,
})
}
Expand Down

0 comments on commit f669b38

Please sign in to comment.