Merge branch 'field-logger-with-hooks-race' of git://github.com/thundercat1/logrus into master
This commit is contained in:
@@ -137,9 +137,9 @@ func (entry *Entry) fireHooks() {
|
||||
}
|
||||
|
||||
func (entry *Entry) write() {
|
||||
serialized, err := entry.Logger.Formatter.Format(entry)
|
||||
entry.Logger.mu.Lock()
|
||||
defer entry.Logger.mu.Unlock()
|
||||
serialized, err := entry.Logger.Formatter.Format(entry)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user