Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mongo/integration/unified/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ func newLogger(olm *observeLogMessages, bufSize int) *Logger {
// Info implements the logger.Sink interface's "Info" method for printing log
// messages.
func (log *Logger) Info(level int, msg string, args ...interface{}) {
log.orderMu.Lock()
defer log.orderMu.Unlock()

if log.logQueue == nil {
return
}
Expand All @@ -62,9 +65,6 @@ func (log *Logger) Info(level int, msg string, args ...interface{}) {
return
}

log.orderMu.Lock()
defer log.orderMu.Unlock()

defer func() { log.lastOrder++ }()

// Add the Diff back to the level, as there is no need to create a
Expand Down