Skip to content

Commit

Permalink
Add trace message output when severity is fatalLog and -logtostderr h…
Browse files Browse the repository at this point in the history
…as been specified
  • Loading branch information
scaat committed Jul 31, 2019
1 parent 6a023d6 commit 9c5b78c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions klog.go
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,10 @@ func (l *loggingT) output(s severity, buf *buffer, file string, line int, alsoTo
for log := fatalLog; log >= infoLog; log-- {
if f := l.file[log]; f != nil { // Can be nil if -logtostderr is set.
f.Write(trace)
} else {
if log == fatalLog {
os.Stderr.Write(trace)
}
}
}
l.mu.Unlock()
Expand Down

0 comments on commit 9c5b78c

Please sign in to comment.