Clean up logs

This commit is contained in:
Michał Gątkowski 2022-08-06 15:44:56 +02:00
parent e036079a97
commit 503fe1b8ec
2 changed files with 3 additions and 2 deletions

View File

@ -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)),

View File

@ -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)),
)