forked from mirror/logrus
parent
5568a01db7
commit
eeed235659
8
entry.go
8
entry.go
|
@ -62,15 +62,15 @@ func (entry *Entry) log(level string, levelInt Level, msg string) string {
|
||||||
entry.Data["level"] = level
|
entry.Data["level"] = level
|
||||||
entry.Data["msg"] = msg
|
entry.Data["msg"] = msg
|
||||||
|
|
||||||
|
if err := entry.Logger.Hooks.Fire(levelInt, entry); err != nil {
|
||||||
|
fmt.Fprintf(os.Stderr, "Failed to fire hook", err)
|
||||||
|
}
|
||||||
|
|
||||||
reader, err := entry.Reader()
|
reader, err := entry.Reader()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v", err)
|
fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := entry.Logger.Hooks.Fire(levelInt, entry); err != nil {
|
|
||||||
fmt.Fprintf(os.Stderr, "Failed to fire hook", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
entry.Logger.mu.Lock()
|
entry.Logger.mu.Lock()
|
||||||
defer entry.Logger.mu.Unlock()
|
defer entry.Logger.mu.Unlock()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue