mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-23 03:02:48 +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 {
|
||||
logger.fileWriteLock.Lock()
|
||||
logger.MethodFile.Writer.WriteString(fullStringRaw + "\n")
|
||||
logger.MethodFile.Writer.Flush()
|
||||
logger.fileWriteLock.Unlock()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user