aboutsummaryrefslogtreecommitdiff
path: root/pkg/state
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@mullvad.net>2022-05-05 22:45:13 +0200
committerRasmus Dahlberg <rasmus@mullvad.net>2022-05-05 23:09:23 +0200
commitc10a9103f959498c360be002b2621e978bb82e19 (patch)
tree213c0ff1eb09851a34798b9e7e74f4469ce0fe36 /pkg/state
parent7b8e4c899e0be8abe2b0772b9b7947e750b343b5 (diff)
replace glog with sigsum-go's log package
Diffstat (limited to 'pkg/state')
-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
}