Skip to content

Conversation

vinodkumarpeddi
Copy link

Summary

This PR adds the Debug derive to the ProxyClientOptions struct in proxy.rs. This makes it easier to log and debug the struct during development and troubleshooting.

Changes Made

  • Added #[derive(Debug)] to ProxyClientOptions in src/serve/proxy.rs.

Why?

Without Debug, logging or printing the struct during runtime results in a compile error. This change improves developer experience.

Checklist

  • Code compiles
  • No breaking changes
  • Enhances developer tooling

Copy link
Collaborator

@ctron ctron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small things I think would improve it.

Was there any AI involved in creating this PR? If so, please add a Assisted-by: <tool> footer to the git commit.

Default::default()
}
);
tracing::debug!("Proxy options: {:?}", opts); // Optional debug log
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd appreciate the comment to be removed, as it's obvious:

Suggested change
tracing::debug!("Proxy options: {:?}", opts); // Optional debug log
tracing::debug!("Proxy options: {opts:#?}");

let no_sys_proxy = opts.no_system_proxy;
let insecure = opts.insecure;
let client = self.clients.get_client(opts)?;
let client = self.clients.get_client(opts.clone())?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you'd pull the tracing statement above this line, you wouldn't need to clone.

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