Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [P4PU-687] Added feign custom logger #158

Merged
merged 9 commits into from
Nov 14, 2024

Conversation

Giuseppe-LaManna
Copy link
Collaborator

List of Changes

  • Added feign custom logger
  • fixed log API /payment-notices

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

log(configKey,"[FEIGN_CLIENT_REQUEST] ---> %s %s", request.httpMethod(), request.url());
log(configKey,"[FEIGN_CLIENT_RESPONSE] <--- Status: %d, response reason: %s, elapsed time (%d ms), response: %s", status, response.reason(), elapsedTime, responseString);

return response.toBuilder().body(bodyData).build();
Copy link
Collaborator

Choose a reason for hiding this comment

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

why don't you just return the input response?
if you don't read the body, the buffer is still available to be read

@@ -59,6 +59,7 @@ rest-client:

logging:
level:
it.gov.pagopa.arc.connector: DEBUG
Copy link
Collaborator

Choose a reason for hiding this comment

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

make it configurable throught env var with default value desired

@@ -59,6 +59,7 @@ rest-client:

logging:
level:
it.gov.pagopa.arc.connector: \${CONNECTOR_LOGGING_LEVEL:DEBUG}
Copy link
Collaborator

Choose a reason for hiding this comment

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

for logging levels, let's use a common prefix

Suggested change
it.gov.pagopa.arc.connector: \${CONNECTOR_LOGGING_LEVEL:DEBUG}
it.gov.pagopa.arc.connector: \${LOGGING_LEVEL_ARC_CONNECTOR:DEBUG}

@Giuseppe-LaManna Giuseppe-LaManna merged commit bb5a3bd into develop Nov 14, 2024
9 of 10 checks passed
@Giuseppe-LaManna Giuseppe-LaManna deleted the P4PU-687-fix-log-arc-be branch November 14, 2024 16:12
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