Skip to content

Commit

Permalink
node: Log local boot ID
Browse files Browse the repository at this point in the history
We have very little logging of the boot IDs. Really fixing that will
require a bit of work to not be too verbose, but in the meantime, we
should at least log the local boot ID.

Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
  • Loading branch information
pchaigno authored and aanm committed Mar 26, 2024
1 parent a652c12 commit 400c112
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/node/bootid.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@

package node

var localBootID string
import "sync"

var (
localBootID string
logOnce sync.Once
)

func GetBootID() string {
logOnce.Do(func() {
log.Infof("Local boot ID is %q", localBootID)
})
return localBootID
}

0 comments on commit 400c112

Please sign in to comment.