Skip to content

Add debug logging support to Rust client generator#21714

Closed
gfx wants to merge 1 commit intoOpenAPITools:masterfrom
gfx:gfx/rust-logger
Closed

Add debug logging support to Rust client generator#21714
gfx wants to merge 1 commit intoOpenAPITools:masterfrom
gfx:gfx/rust-logger

Conversation

@gfx
Copy link
Copy Markdown

@gfx gfx commented Aug 7, 2025

This PR adds debug logging capabilities to the Rust client generator. The changes enable developers to debug API calls by logging HTTP method and URI information.

Changes:

  • Added tracing dependency (^0.1) to the Rust client Cargo.toml template
  • Added debug logging for HTTP method and URI when making API requests

This enhancement helps developers troubleshoot API interactions by providing visibility into the actual HTTP requests being made by the generated Rust client code.

Ideally, a configuration, such as trace: "info" | "debug", should be added, but for now, debug! will work for me (and most of pepole).

@wing328
Copy link
Copy Markdown
Member

wing328 commented Aug 7, 2025

thanks for the PR

please follow step 3 in the PR checklist to update the samples so that the CI can verify the change

@gfx
Copy link
Copy Markdown
Author

gfx commented Aug 15, 2025

Will do it later. For now, I'll make a custom template file for my project.

@gfx gfx closed this Aug 15, 2025
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