Skip to content

feat: add logging HTTP requests and responses #52

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

Merged
merged 7 commits into from
Jul 14, 2022
Merged

Conversation

bednar
Copy link
Contributor

@bednar bednar commented Jul 13, 2022

Proposed Changes

  1. Added logging for HTTP requests and responses.
  2. Redacted authorization header from log output

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • swift test completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2022

Codecov Report

Merging #52 (26ef3fa) into master (976e116) will increase coverage by 23.05%.
The diff coverage is 40.90%.

❗ Current head 26ef3fa differs from pull request most recent head 5be7bf8. Consider uploading reports for the commit 5be7bf8 to get more accurate results

@@             Coverage Diff             @@
##           master      #52       +/-   ##
===========================================
+ Coverage   42.19%   65.25%   +23.05%     
===========================================
  Files         144       17      -127     
  Lines       10354     1321     -9033     
===========================================
- Hits         4369      862     -3507     
+ Misses       5985      459     -5526     
Impacted Files Coverage Δ
Sources/InfluxDBSwift/Internal/LoggingHelper.swift 29.72% <29.72%> (ø)
Sources/InfluxDBSwift/InfluxDBClient.swift 83.33% <100.00%> (+0.57%) ⬆️
...wiftApis/Generated/URLSessionImplementations.swift
Tests/InfluxDBSwiftTests/InfluxDBClientTests.swift
Tests/InfluxDBSwiftTests/XCTestManifests.swift
...s/InfluxDBSwiftApis/Generated/APIs/HealthAPI.swift
...SwiftApis/Generated/Models/PostBucketRequest.swift
...wiftApis/Generated/Models/PatchBucketRequest.swift
...rces/InfluxDBSwiftApis/Generated/Models/Logs.swift
...es/InfluxDBSwiftApis/Generated/APIs/UsersAPI.swift
... and 120 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 976e116...5be7bf8. Read the comment docs.

@bednar bednar marked this pull request as ready for review July 13, 2022 11:58
@bednar bednar requested a review from rhajek July 13, 2022 11:58
@bednar bednar merged commit 149e20c into master Jul 14, 2022
@bednar bednar deleted the logging-http branch July 14, 2022 13:15
@bednar bednar added this to the 1.3.0 milestone Jul 14, 2022
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.

3 participants