aboutsummaryrefslogtreecommitdiff
path: root/pkg/state/single.go
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2022-05-17 13:56:53 +0200
committerLinus Nordberg <linus@nordberg.se>2022-05-17 13:56:53 +0200
commit45d7f7875ce885369b1d1aecc644875cf6bbfdba (patch)
treef015e5012ee9c5c2d843a947cee1b4edbb4f2714 /pkg/state/single.go
parentf7aac347caf5e2aaa91921102ebed158b8ba9c27 (diff)
parentc10a9103f959498c360be002b2621e978bb82e19 (diff)
Merge remote-tracking branch 'origin/merge/glog-to-log'
Diffstat (limited to 'pkg/state/single.go')
-rw-r--r--pkg/state/single.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/state/single.go b/pkg/state/single.go
index e1f0e75..695f0e3 100644
--- a/pkg/state/single.go
+++ b/pkg/state/single.go
@@ -9,8 +9,8 @@ import (
"time"
"git.sigsum.org/log-go/pkg/db"
+ "git.sigsum.org/sigsum-go/pkg/log"
"git.sigsum.org/sigsum-go/pkg/types"
- "github.com/golang/glog"
)
// StateManagerSingle implements a single-instance StateManager
@@ -50,7 +50,7 @@ func (sm *StateManagerSingle) Run(ctx context.Context) {
rotation := func() {
nextSTH, err := sm.latestSTH(ctx)
if err != nil {
- glog.Warningf("cannot rotate without tree head: %v", err)
+ log.Warning("cannot rotate without tree head: %v", err)
return
}
sm.rotate(nextSTH)
@@ -108,21 +108,21 @@ func (sm *StateManagerSingle) rotate(nextSTH *types.SignedTreeHead) {
sm.Lock()
defer sm.Unlock()
- glog.V(3).Infof("rotating tree heads")
+ log.Debug("rotating tree heads")
sm.handleEvents()
sm.setCosignedTreeHead()
sm.setToCosignTreeHead(nextSTH)
}
func (sm *StateManagerSingle) handleEvents() {
- glog.V(3).Infof("handling any outstanding events")
+ log.Debug("handling any outstanding events")
for i, n := 0, len(sm.events); i < n; i++ {
sm.handleEvent(<-sm.events)
}
}
func (sm *StateManagerSingle) handleEvent(ev *event) {
- glog.V(3).Infof("handling event from witness %x", ev.keyHash[:])
+ log.Debug("handling event from witness %x", ev.keyHash[:])
sm.cosignatures[*ev.keyHash] = ev.cosignature
}