arnaucube
arnaucube/asmtPublic Self-hosted repository
asmt/db/logger.go
db/logger.goRaw
 1package db
 2
 3import (
 4	"github.com/aergoio/aergo-lib/log"
 5)
 6
 7type extendedLog struct {
 8	*log.Logger
 9}
10
11func (l *extendedLog) Errorf(f string, v ...interface{}) {
12	l.Error().Msgf(f, v...)
13}
14
15func (l *extendedLog) Warningf(f string, v ...interface{}) {
16	l.Warn().Msgf(f, v...)
17}
18
19func (l *extendedLog) Infof(f string, v ...interface{}) {
20	// reduce info to debug level because infos at badgerdb are too detail
21	l.Debug().Msgf(f, v...) // INFO -> DEBUG
22}
23
24func (l *extendedLog) Debugf(f string, v ...interface{}) {
25	l.Debug().Msgf(f, v...)
26}