From 3715c5d8d2c36811732715257be8e7ffd0770d47 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sat, 18 Mar 2023 17:19:15 +0000 Subject: Fix few debug prints --- cmd_collect.go | 2 +- utils_ct.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd_collect.go b/cmd_collect.go index 4402905..b33ceca 100644 --- a/cmd_collect.go +++ b/cmd_collect.go @@ -295,6 +295,6 @@ func persist(c *chunk.Chunk, End: int64(sth.TreeSize), Done: uint64(newTH.TreeSize) == sth.TreeSize, } - logger.Printf("DEBUG: %s: persisted [%d, %d]\n", desc, oldTH.TreeSize, newTH.TreeSize) + //logger.Printf("DEBUG: %s: persisted [%d, %d]\n", desc, oldTH.TreeSize, newTH.TreeSize) return false, nil } diff --git a/utils_ct.go b/utils_ct.go index 98ee130..49e7358 100644 --- a/utils_ct.go +++ b/utils_ct.go @@ -2,8 +2,7 @@ package main import ( "crypto/sha256" - "fmt" - "os" + logger "log" "strings" "gitlab.torproject.org/rgdd/ct/pkg/metadata" @@ -15,7 +14,7 @@ func logs(md metadata.Metadata) (logs []metadata.Log) { for _, operators := range md.Operators { for _, log := range operators.Logs { if log.Description == nil { - fmt.Fprintf(os.Stderr, "WARNING: skipping log without description") + logger.Printf("WARNING: skipping log without description") continue } if log.State == nil { -- cgit v1.2.3