mirror of https://github.com/go-gorm/gorm.git
Merge pull request #645 from hobeone/master
Change logger to use an interface.
This commit is contained in:
commit
447885d98f
|
@ -14,8 +14,12 @@ type logger interface {
|
||||||
Print(v ...interface{})
|
Print(v ...interface{})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LogWriter interface {
|
||||||
|
Println(v ...interface{})
|
||||||
|
}
|
||||||
|
|
||||||
type Logger struct {
|
type Logger struct {
|
||||||
*log.Logger
|
LogWriter
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultLogger = Logger{log.New(os.Stdout, "\r\n", 0)}
|
var defaultLogger = Logger{log.New(os.Stdout, "\r\n", 0)}
|
||||||
|
|
Loading…
Reference in New Issue