Clean up logs
This commit is contained in:
parent
e036079a97
commit
503fe1b8ec
@ -88,7 +88,7 @@ func NewSink(deadline time.Duration, maxNLeeches int) *Sink {
|
|||||||
ms.incomingInfoHashesMx.Lock()
|
ms.incomingInfoHashesMx.Lock()
|
||||||
l := len(ms.incomingInfoHashes)
|
l := len(ms.incomingInfoHashes)
|
||||||
ms.incomingInfoHashesMx.Unlock()
|
ms.incomingInfoHashesMx.Unlock()
|
||||||
zap.L().Info("Sink status",
|
zap.L().Debug("Sink status",
|
||||||
zap.Int("activeLeeches", l),
|
zap.Int("activeLeeches", l),
|
||||||
zap.Int("nDeleted", ms.deleted),
|
zap.Int("nDeleted", ms.deleted),
|
||||||
zap.Int("drainQueue", len(ms.drain)),
|
zap.Int("drainQueue", len(ms.drain)),
|
||||||
|
@ -3,6 +3,7 @@ package persistence
|
|||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/boramalper/magnetico/pkg/util"
|
||||||
"net/url"
|
"net/url"
|
||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
@ -81,7 +82,7 @@ func (db *postgresDatabase) AddNewTorrent(infoHash []byte, name string, files []
|
|||||||
if !utf8.ValidString(name) {
|
if !utf8.ValidString(name) {
|
||||||
zap.L().Warn(
|
zap.L().Warn(
|
||||||
"Ignoring a torrent whose name is not UTF-8 compliant.",
|
"Ignoring a torrent whose name is not UTF-8 compliant.",
|
||||||
zap.ByteString("infoHash", infoHash),
|
util.HexField("infoHash", infoHash),
|
||||||
zap.Binary("name", []byte(name)),
|
zap.Binary("name", []byte(name)),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user