mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 10:10:08 -08:00
logger: Flush file writes to ensure they get written out
This commit is contained in:
parent
7ac96114c3
commit
f5ecf70ecf
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue