OpenAPITools / OpenAPITools/openapi-generator
[REQ][Java] Configurable log level for interceptor
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
The log level for the request and response is hardcoded to the info level. A configuration to set a different level would be better than hardcoding it.
Ref: https://github.com/OpenAPITools/openapi-generator/blob/888570164887273d55cf7f41e42312c41f7fec75/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache#L824-L836
Describe the solution you'd like
In general, the request and response should be logged at the DEBUG level, but it again depends on the requirements so a configuration option would be helpful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/ApiClient.mustache, especially lines 824-836 referenced in the issue. Determine how a configurable log level should control request and response logging, with DEBUG as the general default, and verify the generated Java client reflects the selected setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100