mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #19038 from gottwald/logfix
Fix race condition in JSONFileLogger.Log
This commit is contained in:
commit
b2d00e312b
1 changed files with 2 additions and 0 deletions
|
@ -90,6 +90,8 @@ func (l *JSONFileLogger) Log(msg *logger.Message) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
l.mu.Lock()
|
||||
defer l.mu.Unlock()
|
||||
err = (&jsonlog.JSONLogs{
|
||||
Log: append(msg.Line, '\n'),
|
||||
Stream: msg.Source,
|
||||
|
|
Loading…
Add table
Reference in a new issue