Skip to content

Commit

Permalink
use SetLevel() instead of Level = ? to prevent data race
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Sussman authored and kahing committed Jul 12, 2021
1 parent 0c99327 commit 697672b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/common/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ func GetLogger(name string) *LogHandle {

if logger, ok := loggers[name]; ok {
if name != "main" && name != "fuse" {
logger.Level = cloudLogLevel
logger.SetLevel(cloudLogLevel)
}
return logger
} else {
logger := NewLogger(name)
loggers[name] = logger
if name != "main" && name != "fuse" {
logger.Level = cloudLogLevel
logger.SetLevel(cloudLogLevel)
}
return logger
}
Expand Down

0 comments on commit 697672b

Please sign in to comment.