better logging

This commit is contained in:
Daniel Smith
2014-12-19 12:28:51 -08:00
parent 5807b3d6bc
commit be9f3be709
2 changed files with 5 additions and 5 deletions

View File

@@ -168,8 +168,8 @@ func (rl *respLogger) Write(b []byte) (int, error) {
func (rl *respLogger) Flush() {
if flusher, ok := rl.w.(http.Flusher); ok {
flusher.Flush()
} else {
glog.V(2).Infof("Unable to convert %v into http.Flusher", rl.w)
} else if glog.V(2) {
glog.InfoDepth(1, fmt.Sprintf("Unable to convert %+v into http.Flusher", rl.w))
}
}