Move from logrus to zerolog. (#45)
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
This commit is contained in:
parent
2a38efbb03
commit
3b87e4aad7
10 changed files with 50 additions and 39 deletions
torrent
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/distribyted/distribyted/config"
|
||||
"github.com/distribyted/distribyted/fs"
|
||||
"github.com/distribyted/distribyted/stats"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
|
@ -49,14 +49,14 @@ func (s *Handler) Load(path string, ts []*config.Torrent) error {
|
|||
|
||||
// only get info if name is not available
|
||||
if t.Name() == "" {
|
||||
log.WithField("hash", t.InfoHash()).Info("getting torrent info")
|
||||
log.Info().Str("hash", t.InfoHash().String()).Msg("getting torrent info")
|
||||
<-t.GotInfo()
|
||||
}
|
||||
|
||||
s.s.Add(path, t)
|
||||
torrents = append(torrents, t)
|
||||
|
||||
log.WithField("name", t.Name()).WithField("path", path).Info("torrent added to mountpoint")
|
||||
log.Info().Str("name", t.Name()).Str("path", path).Msg("torrent added to mountpoint")
|
||||
}
|
||||
|
||||
folder := path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue