mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-09 12:49:03 +00:00
logger/glog: fix TraceLocation.Set("")
This commit is contained in:
parent
5728dd381d
commit
a411fe7e6e
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue