1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-27 15:41:45 +01:00

chore: uses zerolog instead of logrus (#3203)

This commit is contained in:
Amir Raminfar
2024-08-14 10:04:18 -07:00
committed by GitHub
parent 37f0249065
commit 077eeb7917
38 changed files with 278 additions and 265 deletions

View File

@@ -4,7 +4,7 @@ import (
"sync"
"time"
log "github.com/sirupsen/logrus"
"github.com/rs/zerolog/log"
)
type Cache[T any] struct {
@@ -36,11 +36,7 @@ func (c *Cache[T]) GetWithHit() (T, error, bool) {
}
c.Timestamp = time.Now()
}
if hit {
log.Debugf("Cache hit for %T", c.Data)
} else {
log.Debugf("Cache miss for %T", c.Data)
}
log.Debug().Bool("hit", hit).Type("data", c.Data).Msg("Cache hit")
return c.Data, nil, hit
}