mirror of https://github.com/sirupsen/logrus.git
commit
3d46664b06
2
entry.go
2
entry.go
|
@ -8,7 +8,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// An entry is the final or intermediate Logrus logging entry. It containts all
|
// An entry is the final or intermediate Logrus logging entry. It contains all
|
||||||
// the fields passed with WithField{,s}. It's finally logged when Debug, Info,
|
// the fields passed with WithField{,s}. It's finally logged when Debug, Info,
|
||||||
// Warn, Error, Fatal or Panic is called on it. These objects can be reused and
|
// Warn, Error, Fatal or Panic is called on it. These objects can be reused and
|
||||||
// passed around as much as you wish to avoid field duplication.
|
// passed around as much as you wish to avoid field duplication.
|
||||||
|
|
|
@ -96,7 +96,7 @@ func Fatal(args ...interface{}) {
|
||||||
std.Fatal(args...)
|
std.Fatal(args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debugf logs a message at level Debugf on the standard logger.
|
// Debugf logs a message at level Debug on the standard logger.
|
||||||
func Debugf(format string, args ...interface{}) {
|
func Debugf(format string, args ...interface{}) {
|
||||||
std.Debugf(format, args...)
|
std.Debugf(format, args...)
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ func Errorf(format string, args ...interface{}) {
|
||||||
std.Errorf(format, args...)
|
std.Errorf(format, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Panicf logs a message at level Pancf on the standard logger.
|
// Panicf logs a message at level Panic on the standard logger.
|
||||||
func Panicf(format string, args ...interface{}) {
|
func Panicf(format string, args ...interface{}) {
|
||||||
std.Panicf(format, args...)
|
std.Panicf(format, args...)
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ type Formatter interface {
|
||||||
//
|
//
|
||||||
// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."}
|
// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."}
|
||||||
//
|
//
|
||||||
// It's not exported because it's still using Data in an opionated way. It's to
|
// It's not exported because it's still using Data in an opinionated way. It's to
|
||||||
// avoid code duplication between the two default formatters.
|
// avoid code duplication between the two default formatters.
|
||||||
func prefixFieldClashes(entry *Entry) {
|
func prefixFieldClashes(entry *Entry) {
|
||||||
_, ok := entry.Data["time"]
|
_, ok := entry.Data["time"]
|
||||||
|
|
Loading…
Reference in New Issue