Skip to content

Support request debug logging in the builder package #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

welteki
Copy link
Member

@welteki welteki commented Jun 18, 2025

Description

Support setting FAAS_DEBUG=1 for request made to the Function Builder API using the go-sdk.

The request body is only logged if the Content-Type is printable (e.g. application/json or text/plain) to prevent payloads that are not human readable, like the build context tar, from getting logged out.

How has this been tested

Unit test have been updated and this change has been tested by using this version of the go-sdk with the faas-cli.

Verified requests are printed to the console correctly when the FAAS_DEBUG=1 env variable is set.

The request body is only logged if the Content-Type is printable (e.g.
application/json or text/plain) to prevent payloads that are not human
readable, like the build context tar, from getting logged out.

Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
@alexellis alexellis merged commit 7258cb7 into openfaas:master Jun 18, 2025
1 check passed
@welteki welteki deleted the request-logging branch June 18, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants