mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
logger: Flush file writes to ensure they get written out
This commit is contained in:
parent
7ac96114c3
commit
f5ecf70ecf
@ -242,6 +242,7 @@ func (logger *singleLogger) Log(level Level, logType string, messageParts ...str
|
|||||||
if logger.MethodFile.Enabled {
|
if logger.MethodFile.Enabled {
|
||||||
logger.fileWriteLock.Lock()
|
logger.fileWriteLock.Lock()
|
||||||
logger.MethodFile.Writer.WriteString(fullStringRaw + "\n")
|
logger.MethodFile.Writer.WriteString(fullStringRaw + "\n")
|
||||||
|
logger.MethodFile.Writer.Flush()
|
||||||
logger.fileWriteLock.Unlock()
|
logger.fileWriteLock.Unlock()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user