Skip to content

Commit

Permalink
Ignore Sync errors (#347)
Browse files Browse the repository at this point in the history
Take the simplest approach to fixing the cross-platform compatibility issues with syncing stderr and stdout (outlined in #328) and just ignore sync errors. If we come up with a clean solution to #370, we can revert this change.
  • Loading branch information
Ulexus authored and akshayjshah committed Mar 14, 2017
1 parent 74ca5ef commit 402d056
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zapcore/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ func (c *ioCore) Write(ent Entry, fields []Field) error {
return err
}
if ent.Level > ErrorLevel {
// Since we may be crashing the program, sync the output.
return c.Sync()
// Since we may be crashing the program, sync the output. Ignore Sync
// errors, pending a clean solution to issue #370.
c.Sync()
}
return nil
}
Expand Down

0 comments on commit 402d056

Please sign in to comment.