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 request and response logging #68

Merged
merged 31 commits into from
May 13, 2024

Conversation

hamzamahmood
Copy link
Collaborator

What

This PR adds the support for request and response logging in C# SDK. LoggingConfiguration exposes the ILogger instance from Microsoft.Extensions.Logging.Abstractions which the user can provide in the client configuration builder from the SDK.
If the user doesn't provide the ILogger implementation, the SDK will log the request and response using the default Console Logger implementation.

Why

To add configurable logger support in C# SDK.

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

  • Added "Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" package dependency

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 added the enhancement New feature or request label May 7, 2024
@hamzamahmood hamzamahmood requested a review from Shield-Jaguar May 7, 2024 11:01
@hamzamahmood hamzamahmood self-assigned this May 7, 2024
Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

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

See analysis details on SonarCloud

APIMatic.Core/ApiCall.cs Outdated Show resolved Hide resolved
APIMatic.Core/ApiCall.cs Show resolved Hide resolved
@hamzamahmood hamzamahmood merged commit f2d6a70 into main May 13, 2024
13 checks passed
@asadali214 asadali214 deleted the sdk-logging branch July 4, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants