Skip to content

fix: honor RUST_LOG in logging and fix the fatal doc - #38

Merged
jonasz-lasut merged 2 commits into
mainfrom
fix/logging-and-fatal-doc
Oct 11, 2026
Merged

jonasz-lasut merged 2 commits into
mainfrom
fix/logging-and-fatal-doc

Conversation

@jonasz-lasut

Copy link
Copy Markdown
Collaborator

Implements the logging::Builder proposed in #32 (an EnvFilter that honors RUST_LOG, holds the gRPC transport crates at INFO under --debug and writes to stderr) and the corrected response::fatal doc comment from #37.

Fixes #32
Fixes #37

configure(debug) set one max level for every crate in the binary, so
--debug raised h2, hyper, tonic and the rest of the transport stack to
DEBUG and buried the function's own logs, and RUST_LOG was ignored.

Build an EnvFilter instead. Under --debug everything is at DEBUG except
the gRPC, HTTP/2 and TLS crates, which stay at INFO; RUST_LOG, when set,
replaces the level selection in full. A new logging::Builder keeps
configure's defaults and adds quiet(targets) to hold back more crates.
Logs now go to stderr instead of stdout, like function-sdk-go's zap
loggers.

Fixes #32

Signed-off-by: Jonasz Małecki <jonasz@upbound.io>
Crossplane stops the pipeline at the first fatal result: later steps do
not run, and nothing is applied or garbage-collected for that reconcile.

Fixes #37

Signed-off-by: Jonasz Małecki <jonasz@upbound.io>
@jonasz-lasut
jonasz-lasut marked this pull request as ready for review October 11, 2026 15:38
@jonasz-lasut
jonasz-lasut merged commit 0a7eda5 into main Oct 11, 2026
5 checks passed
@jonasz-lasut
jonasz-lasut deleted the fix/logging-and-fatal-doc branch October 11, 2026 15:38
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.

response::fatal doc comment says later pipeline steps may still run logging::configure ignores RUST_LOG and floods logs under --debug

1 participant