summaryrefslogtreecommitdiffstats
path: root/utils/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/config.go')
-rw-r--r--utils/config.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/config.go b/utils/config.go
index cecc7a361..2e41f8431 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -72,6 +72,8 @@ func FindDir(dir string) string {
}
func DisableDebugLogForTest() {
+ cfgMutex.Lock()
+ defer cfgMutex.Unlock()
if l4g.Global["stdout"] != nil {
originalDisableDebugLvl = l4g.Global["stdout"].Level
l4g.Global["stdout"].Level = l4g.ERROR
@@ -79,6 +81,8 @@ func DisableDebugLogForTest() {
}
func EnableDebugLogForTest() {
+ cfgMutex.Lock()
+ defer cfgMutex.Unlock()
if l4g.Global["stdout"] != nil {
l4g.Global["stdout"].Level = originalDisableDebugLvl
}