xorm/ilogger.go

32 lines
689 B
Go
Raw Normal View History

package core
type LogLevel int
const (
// !nashtsai! following level also match syslog.Priority value
2016-03-24 14:45:18 +00:00
LOG_DEBUG LogLevel = iota
LOG_INFO
LOG_WARNING
2016-03-24 14:45:18 +00:00
LOG_ERR
LOG_OFF
LOG_UNKNOWN
)
// logger interface
type ILogger interface {
Debug(v ...interface{}) (err error)
Debugf(format string, v ...interface{}) (err error)
Err(v ...interface{}) (err error)
Errf(format string, v ...interface{}) (err error)
Info(v ...interface{}) (err error)
Infof(format string, v ...interface{}) (err error)
Warning(v ...interface{}) (err error)
Warningf(format string, v ...interface{}) (err error)
Level() LogLevel
SetLevel(l LogLevel) (err error)
2016-02-16 09:14:10 +00:00
ShowSQL(show ...bool)
IsShowSQL() bool
}