summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/alecthomas/log4go/filelog.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-04-04 11:42:07 -0700
committerHarrison Healey <harrisonmhealey@gmail.com>2017-04-04 14:42:07 -0400
commit6bf080393d88534aa658ecaff32ae089bd304772 (patch)
treebe25ba4cea3d687d11fe49537b84fae4bf21a484 /vendor/github.com/alecthomas/log4go/filelog.go
parent32460bf63bc07c69ee5da0bb5640b879facb5538 (diff)
downloadchat-6bf080393d88534aa658ecaff32ae089bd304772.tar.gz
chat-6bf080393d88534aa658ecaff32ae089bd304772.tar.bz2
chat-6bf080393d88534aa658ecaff32ae089bd304772.zip
Fixing race conditions in the code base (#5966)
* Adding initial race detector * Remove setting of config twice * Fixing config file watch and config reload on license save * Fixing config file watch and config reload on license save * Fixing build error * Fixing locking issue * Fixing makefile * Fixing race in config * Fixing race in status unit test * Adding EE race tests * Fixing race in cluster info * Removing code that's isn't needed * Fixing some more races * Fixing govet issue
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()
}
}()