2014-02-24 04:50:42 +04:00
|
|
|
package logrus
|
2014-02-23 18:57:04 +04:00
|
|
|
|
2014-03-11 03:22:08 +04:00
|
|
|
type Fields map[string]interface{}
|
2014-02-23 18:57:04 +04:00
|
|
|
|
2014-03-11 03:52:39 +04:00
|
|
|
type Level uint8
|
2014-02-23 18:57:04 +04:00
|
|
|
|
|
|
|
const (
|
2014-03-11 03:52:39 +04:00
|
|
|
Panic Level = iota
|
|
|
|
Fatal
|
|
|
|
Error
|
|
|
|
Warn
|
|
|
|
Info
|
|
|
|
Debug
|
2014-02-23 18:57:04 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
// StandardLogger is what your logrus-enabled library should take, that way
|
|
|
|
// it'll accept a stdlib logger and a logrus logger. There's no standard
|
|
|
|
// interface, this is the closest we get, unfortunately.
|
|
|
|
type StandardLogger interface {
|
|
|
|
Print(...interface{})
|
|
|
|
Printf(string, ...interface{})
|
|
|
|
Printfln(...interface{})
|
|
|
|
|
|
|
|
Fatal(...interface{})
|
|
|
|
Fatalf(string, ...interface{})
|
|
|
|
Fatalln(...interface{})
|
|
|
|
|
|
|
|
Panic(...interface{})
|
|
|
|
Panicf(string, ...interface{})
|
|
|
|
Panicln(...interface{})
|
|
|
|
}
|