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

feat(logging): add support for structured logging #56

Merged
merged 35 commits into from
Apr 23, 2024
Merged

Conversation

hamzamahmood
Copy link
Contributor

@hamzamahmood hamzamahmood commented Apr 18, 2024

What

This PR updates the current implementation of the logging and logging configuration and some code cleanup changes.

  • We have simplified the ApiLogger interface which now only has logRequest and logResponse.
  • We have added ReadonlyLogOptions ReadonlyRequestLogging and ReadonlyResponseLogging interface for configuring the Request and Response Logging Options.
  • We had to introduce slf4j dependency in core-interfaces-java.
  • We have added getUrl() method in Request interface.
  • We Removed ArraySerializationFormat from the endpoint configuration

Why

The following changes are made to make the logging in Java robust and add the support for multilevel log option configuration to improve the user experience.

Type of change

Select multiple if applicable.

  • 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 a breaking change)
  • Tests (adds or updates tests)
  • Documentation (adds or updates documentation)
  • Refactor (style improvements, performance improvements, code refactoring)
  • Revert (reverts a commit)
  • CI/Build (adds or updates a script, change in external dependencies)

Dependency Change

org.slf4j dependency has been added.

Breaking change

Changes in ReadonlyLogging will be a breaking change for the user

Testing

We have added unit tests for logging request

Checklist

  • My code follows the coding conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added new unit tests

@hamzamahmood hamzamahmood self-assigned this Apr 18, 2024
@hamzamahmood hamzamahmood changed the title feat(add-structured-logging): add support for structured logging feat(logging): add support for structured logging Apr 18, 2024
Copy link
Collaborator

@sufyankhanrao sufyankhanrao left a comment

Choose a reason for hiding this comment

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

Kindly update ReadMe for new added interfaces.

sufyankhanrao
sufyankhanrao previously approved these changes Apr 18, 2024
sufyankhanrao
sufyankhanrao previously approved these changes Apr 18, 2024
sufyankhanrao
sufyankhanrao previously approved these changes Apr 19, 2024
sufyankhanrao
sufyankhanrao previously approved these changes Apr 19, 2024
README.md Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Apr 23, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@sufyankhanrao sufyankhanrao merged commit f69e3cb into main Apr 23, 2024
5 checks passed
@sufyankhanrao sufyankhanrao deleted the poc-logging branch April 23, 2024 09:37
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.

None yet

3 participants