aboutsummaryrefslogtreecommitdiffstats
path: root/logger/glog
diff options
context:
space:
mode:
Diffstat (limited to 'logger/glog')
-rw-r--r--logger/glog/glog.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/logger/glog/glog.go b/logger/glog/glog.go
index b8eaf9359..e760e507b 100644
--- a/logger/glog/glog.go
+++ b/logger/glog/glog.go
@@ -407,9 +407,13 @@ var errTraceSyntax = errors.New("syntax error: expect file.go:234")
func (t *TraceLocation) Set(value string) error {
if value == "" {
// Unset.
+ logging.mu.Lock()
t.line = 0
t.file = ""
+ logging.mu.Unlock()
+ return nil
}
+
fields := strings.Split(value, ":")
if len(fields) != 2 {
return errTraceSyntax