mirror of
https://github.com/openfaas/faas.git
synced 2025-06-20 04:56:38 +00:00
chore: add log for easy debug
Signed-off-by: haozibi <haozibi@foxmail.com>
This commit is contained in:
@ -94,6 +94,9 @@ func pipeRequest(config *WatchdogConfig, w http.ResponseWriter, r *http.Request,
|
|||||||
var buildInputErr error
|
var buildInputErr error
|
||||||
requestBody, buildInputErr = buildFunctionInput(config, r)
|
requestBody, buildInputErr = buildFunctionInput(config, r)
|
||||||
if buildInputErr != nil {
|
if buildInputErr != nil {
|
||||||
|
if config.writeDebug == true {
|
||||||
|
log.Printf("Error=%s, ReadLen=%d\n", buildInputErr.Error(), len(requestBody))
|
||||||
|
}
|
||||||
ri.headerWritten = true
|
ri.headerWritten = true
|
||||||
w.WriteHeader(http.StatusBadRequest)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
// I.e. "exit code 1"
|
// I.e. "exit code 1"
|
||||||
|
Reference in New Issue
Block a user