Commit a411fe7e authored by Felix Lange's avatar Felix Lange

logger/glog: fix TraceLocation.Set("")

parent 5728dd38
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment