diff options
author | Felix Lange <fjl@twurst.com> | 2016-01-27 07:49:35 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-01-27 07:51:14 +0800 |
commit | a411fe7e6e8340064f5bf8c67bfb1ae7d172905d (patch) | |
tree | 23bfe1b9e0f19ae86aeb59d17196f49cc5cefec9 /logger/glog | |
parent | 5728dd381d344e8e8fca2df06be0ab7330980b66 (diff) | |
download | go-tangerine-a411fe7e6e8340064f5bf8c67bfb1ae7d172905d.tar go-tangerine-a411fe7e6e8340064f5bf8c67bfb1ae7d172905d.tar.gz go-tangerine-a411fe7e6e8340064f5bf8c67bfb1ae7d172905d.tar.bz2 go-tangerine-a411fe7e6e8340064f5bf8c67bfb1ae7d172905d.tar.lz go-tangerine-a411fe7e6e8340064f5bf8c67bfb1ae7d172905d.tar.xz go-tangerine-a411fe7e6e8340064f5bf8c67bfb1ae7d172905d.tar.zst go-tangerine-a411fe7e6e8340064f5bf8c67bfb1ae7d172905d.zip |
logger/glog: fix TraceLocation.Set("")
Diffstat (limited to 'logger/glog')
-rw-r--r-- | logger/glog/glog.go | 4 |
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 |