summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/alecthomas/log4go/filelog.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/alecthomas/log4go/filelog.go')
-rw-r--r--vendor/github.com/alecthomas/log4go/filelog.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/github.com/alecthomas/log4go/filelog.go b/vendor/github.com/alecthomas/log4go/filelog.go
index ee0ab0c04..9bc4df15f 100644
--- a/vendor/github.com/alecthomas/log4go/filelog.go
+++ b/vendor/github.com/alecthomas/log4go/filelog.go
@@ -47,7 +47,6 @@ func (w *FileLogWriter) LogWrite(rec *LogRecord) {
func (w *FileLogWriter) Close() {
close(w.rec)
- w.file.Sync()
}
// NewFileLogWriter creates a new LogWriter which writes to the given file and
@@ -79,6 +78,7 @@ func NewFileLogWriter(fname string, rotate bool) *FileLogWriter {
defer func() {
if w.file != nil {
fmt.Fprint(w.file, FormatLogRecord(w.trailer, &LogRecord{Created: time.Now()}))
+ w.file.Sync()
w.file.Close()
}
}()