From 17deaf1e21d432f8d4c8e1f69153c73bdbc0d1a5 Mon Sep 17 00:00:00 2001 From: Akshay Shah Date: Mon, 13 Mar 2017 09:52:50 -0700 Subject: [PATCH] Ignore sync errors --- zapcore/core.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zapcore/core.go b/zapcore/core.go index f3c6f459a..9e6e28c73 100644 --- a/zapcore/core.go +++ b/zapcore/core.go @@ -92,8 +92,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.out.Sync() + // Since we may be crashing the program, sync the output. Ignore Sync + // errors, pending a clean solution to issue #370. + c.out.Sync() } return nil }