logger.go 246 B

123456789101112131415
  1. package dbutil
  2. import (
  3. "fmt"
  4. "io"
  5. )
  6. // Logger is a wrapper of io.Writer for the GORM's logger.Writer.
  7. type Logger struct {
  8. io.Writer
  9. }
  10. func (l *Logger) Printf(format string, args ...interface{}) {
  11. fmt.Fprintf(l.Writer, format, args...)
  12. }