Allow configuring shouldLogRequestHeader/shouldLogResponseHeader
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 57/100
Research direction
Start by tracing the existing shouldLogRequestHeader and shouldLogResponseHeader methods and the Spring Cloud OpenFeign client configuration entry points. Add the four request and response include/exclude properties, then verify that excluded headers are omitted and that an include list limits logged headers when present.
Written by the indexing model from the issue text.
Description
**Suppressing specific headers is cumbersome **
Certain headers should probably not be logged, e.g., Authorization.
Add configuration properties to include/exclude headers
Add the following list configurations:
spring.cloud.openfeign.client.config.name.headers.request.includespring.cloud.openfeign.client.config.name.headers.request.excludespring.cloud.openfeign.client.config.name.headers.response.includespring.cloud.openfeign.client.config.name.headers.response.exclude
The expected behavior would be to exclude any header in the exclude list, and only show header in the include list if any are present.
Alternatives: Making a custom component
@Component
class MyFeignLoggerFactory implements FeignLoggerFactory {
@Override
public Logger create(Class<?> type) {
return new Slf4jLogger(type) {
@Override
protected boolean shouldLogRequestHeader(String header) {
return !"Authorization".equals(header);
}
};
}
}
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 836
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from spring-cloud/spring-cloud-openfeign
-
question
Difficulty 4/5 3-5 days Newbie friendliness 35/100
spring-cloud/spring-cloud-openfeign#1392 · 1 comment ·
Maintainers usually reply within 1 day
-
FeignClientsConfiguration$MicrometerConfiguration.class cannot be opened because it does not existOpenfeedback-provided
Difficulty 4/5 3-5 days Newbie friendliness 35/100
spring-cloud/spring-cloud-openfeign#1379 · 5 comments ·
Maintainers usually reply within 1 day
-
waiting-for-triage
Difficulty 4/5 3-5 days Newbie friendliness 45/100
spring-cloud/spring-cloud-openfeign#1343 ·
Maintainers usually reply within 1 day
-
waiting-for-triage
Difficulty 3/5 1-2 days Newbie friendliness 45/100
spring-cloud/spring-cloud-openfeign#1340 · 1 comment ·
Maintainers usually reply within 1 day
-
dependencies
Difficulty 3/5 1-2 days Newbie friendliness 55/100
spring-cloud/spring-cloud-openfeign#1334 · 11 comments · 4 reactions ·
Maintainers usually reply within 1 day
All issues in spring-cloud/spring-cloud-openfeign
Similar issues
-
`timer` rule rejects dates the engine acceptsPossibly taken @MFA-G claimed this today. Openbug ready
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
camunda/bpmnlint-plugin-camunda-compat#281 · 3 comments ·
Maintainers usually reply within 1 day
-
status: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
AOT compilation fails for derived delete queries returning SetPossibly taken @ryujungkyun claimed this today. Openstatus: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
spring-projects/spring-data-jpa#4387 ·
Maintainers usually reply within 3 days