You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
538 B

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