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: move to zerolog #56

Merged
merged 5 commits into from
Sep 14, 2024
Merged

feat: move to zerolog #56

merged 5 commits into from
Sep 14, 2024

Conversation

golanglemonade
Copy link
Member

@golanglemonade golanglemonade commented Sep 12, 2024

Switch to rs/zerolog from uber-go/zap

  • no more passing a logger through from server startup
  • you can call log.* from anywhere in the code (including other packages) without initializing a new logger
  • Global settings are still configure on startup, such as long level and output format, and these are used whenever log. is called unless overridded
  • Contextual logging in the bodydump middleware, simplifying that code
  • pretty colors by default in pretty mode
image

depends on:
theopenlane/utils#14
theopenlane/iam#24
theopenlane/entx#18
theopenlane/gqlgen-plugins#10

(@matoszz was right, this is way better)

Signed-off-by: Sarah Funkhouser <[email protected]>
Signed-off-by: Sarah Funkhouser <[email protected]>
Signed-off-by: Sarah Funkhouser <[email protected]>
Signed-off-by: Sarah Funkhouser <[email protected]>
Copy link

sonarcloud bot commented Sep 13, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
6.7% Duplication on New Code (required ≤ 5%)

See analysis details on SonarCloud

@golanglemonade golanglemonade merged commit 465c9f9 into main Sep 14, 2024
17 of 18 checks passed
@golanglemonade golanglemonade deleted the feat-logger branch September 14, 2024 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants