diff --git a/cmd/magneticod/bittorrent/metadata/sink.go b/cmd/magneticod/bittorrent/metadata/sink.go index cec518e..24866a4 100644 --- a/cmd/magneticod/bittorrent/metadata/sink.go +++ b/cmd/magneticod/bittorrent/metadata/sink.go @@ -88,7 +88,7 @@ func NewSink(deadline time.Duration, maxNLeeches int) *Sink { ms.incomingInfoHashesMx.Lock() l := len(ms.incomingInfoHashes) ms.incomingInfoHashesMx.Unlock() - zap.L().Info("Sink status", + zap.L().Debug("Sink status", zap.Int("activeLeeches", l), zap.Int("nDeleted", ms.deleted), zap.Int("drainQueue", len(ms.drain)), diff --git a/pkg/persistence/postgres.go b/pkg/persistence/postgres.go index 2917d31..c610e9e 100644 --- a/pkg/persistence/postgres.go +++ b/pkg/persistence/postgres.go @@ -3,6 +3,7 @@ package persistence import ( "database/sql" "fmt" + "github.com/boramalper/magnetico/pkg/util" "net/url" "text/template" "time" @@ -81,7 +82,7 @@ func (db *postgresDatabase) AddNewTorrent(infoHash []byte, name string, files [] if !utf8.ValidString(name) { zap.L().Warn( "Ignoring a torrent whose name is not UTF-8 compliant.", - zap.ByteString("infoHash", infoHash), + util.HexField("infoHash", infoHash), zap.Binary("name", []byte(name)), )