Skip to content

Commit

Permalink
chore: add log for easy debug
Browse files Browse the repository at this point in the history
Signed-off-by: haozibi <haozibi@foxmail.com>
  • Loading branch information
haozibi authored and alexellis committed Jul 11, 2019
1 parent 4814822 commit e8b3818
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions watchdog/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ func pipeRequest(config *WatchdogConfig, w http.ResponseWriter, r *http.Request,
var buildInputErr error
requestBody, buildInputErr = buildFunctionInput(config, r)
if buildInputErr != nil {
if config.writeDebug == true {
log.Printf("Error=%s, ReadLen=%d\n", buildInputErr.Error(), len(requestBody))
}
ri.headerWritten = true
w.WriteHeader(http.StatusBadRequest)
// I.e. "exit code 1"
Expand Down

0 comments on commit e8b3818

Please sign in to comment.