lasso/internal/logging/badger.go

26 lines
589 B
Go
Raw Normal View History

2021-11-12 00:13:40 +00:00
package logging
import (
"strings"
"github.com/rs/zerolog/log"
)
type BadgerLogger struct{}
func (BadgerLogger) Infof(format string, v ...interface{}) {
log.Info().Msgf(strings.TrimSuffix(format, "\n"), v...)
}
func (BadgerLogger) Warningf(format string, v ...interface{}) {
log.Error().Msgf(strings.TrimSuffix(format, "\n"), v...)
}
func (BadgerLogger) Debugf(format string, v ...interface{}) {
log.Debug().Msgf(strings.TrimSuffix(format, "\n"), v...)
}
func (BadgerLogger) Errorf(format string, v ...interface{}) {
log.Error().Msgf(strings.TrimSuffix(format, "\n"), v...)
}