Skip to content

Commit

Permalink
Merge pull request kubernetes#31 from shsjshentao/master
Browse files Browse the repository at this point in the history
stderrthreshold is useless if logtostderr is set
  • Loading branch information
k8s-ci-robot authored Dec 24, 2018
2 parents 73cec49 + f4331f8 commit f0c3f94
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion klog.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,9 @@ func (l *loggingT) output(s severity, buf *buffer, file string, line int, alsoTo
}
data := buf.Bytes()
if l.toStderr {
os.Stderr.Write(data)
if s >= l.stderrThreshold.get() {
os.Stderr.Write(data)
}
} else {
if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() {
os.Stderr.Write(data)
Expand Down

0 comments on commit f0c3f94

Please sign in to comment.