mirror of
https://github.com/openfaas/faas.git
synced 2025-06-19 04:26:35 +00:00
Fixes 251. Set debug_write to false by default. Added log output of byte count when debug is false. Updated tests to match new default
Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
b308388bc2
commit
b9f59f5150
@ -145,6 +145,8 @@ func pipeRequest(config *WatchdogConfig, w http.ResponseWriter, r *http.Request,
|
||||
if config.writeDebug == true {
|
||||
log.Printf("Success=%t, Error=%s\n", targetCmd.ProcessState.Success(), err.Error())
|
||||
log.Printf("Out=%s\n", out)
|
||||
} else {
|
||||
log.Printf("An Error Occurred\n")
|
||||
}
|
||||
|
||||
if ri.headerWritten == false {
|
||||
@ -162,6 +164,8 @@ func pipeRequest(config *WatchdogConfig, w http.ResponseWriter, r *http.Request,
|
||||
|
||||
if config.writeDebug == true {
|
||||
os.Stdout.Write(out)
|
||||
} else {
|
||||
log.Printf("Wrote %d Bytes\n", len(out))
|
||||
}
|
||||
|
||||
if len(config.contentType) > 0 {
|
||||
|
Reference in New Issue
Block a user