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: Support levelled logs using slog in go module. #1955

Merged
merged 18 commits into from
Jun 11, 2024
Merged

Conversation

thomaspoignant
Copy link
Owner

@thomaspoignant thomaspoignant commented Jun 7, 2024

Description

This PR adds support to levelled logs using the new go logging capabilities slog.

Using slog is optional but recommended. It keeps supporting the log.logger interface.
To use this new way of logging inside add your slog logger in the LevelledLogger field in the configuration.

Closes issue(s)

Resolves #1713

Checklist

  • I have tested this code
  • I have added unit test to cover this code
  • I have updated the documentation (README.md and /website/docs)
  • I have followed the contributing guide

Signed-off-by: Thomas Poignant <[email protected]>
Signed-off-by: Thomas Poignant <[email protected]>
Signed-off-by: Thomas Poignant <[email protected]>
Signed-off-by: Thomas Poignant <[email protected]>
Signed-off-by: Thomas Poignant <[email protected]>
Copy link

netlify bot commented Jun 7, 2024

Deploy Preview for go-feature-flag-doc-preview ready!

Name Link
🔨 Latest commit 8631b44
🔍 Latest deploy log https://app.netlify.com/sites/go-feature-flag-doc-preview/deploys/6668ae44eb2acc0008c17490
😎 Deploy Preview https://deploy-preview-1955--go-feature-flag-doc-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 85.86957% with 13 lines in your changes missing coverage. Please review.

Project coverage is 86.96%. Comparing base (a2e12be) to head (8631b44).

Files Patch % Lines
internal/cache/in_memory_cache.go 20.00% 4 Missing ⚠️
exporter/gcstorageexporter/exporter.go 33.33% 2 Missing ⚠️
exporter/s3exporter/exporter.go 50.00% 2 Missing ⚠️
retriever/manager.go 66.66% 1 Missing and 1 partial ⚠️
cmd/relayproxy/service/gofeatureflag.go 0.00% 1 Missing ⚠️
exporter/s3exporterv2/exporter.go 66.66% 1 Missing ⚠️
feature_flag.go 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1955      +/-   ##
==========================================
+ Coverage   86.88%   86.96%   +0.08%     
==========================================
  Files          98       98              
  Lines        3553     3599      +46     
==========================================
+ Hits         3087     3130      +43     
- Misses        358      359       +1     
- Partials      108      110       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Jun 11, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud

@thomaspoignant thomaspoignant merged commit 306b117 into main Jun 11, 2024
21 of 22 checks passed
@thomaspoignant thomaspoignant deleted the feat-slog branch June 11, 2024 20:11
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.

(change) Use slog in the go module
1 participant