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

fix: support custom slog levels #117

Merged
merged 3 commits into from
Apr 22, 2024
Merged

fix: support custom slog levels #117

merged 3 commits into from
Apr 22, 2024

Conversation

lvlcn-t
Copy link
Contributor

@lvlcn-t lvlcn-t commented Apr 5, 2024

Motivation

Closes #116

Changes

I've removed the fromSlogLevel map and type casting to int32/Level instead.

For more information look at the commits.

Tests done

I've provided two unit tests with custom slog levels. If you want me to write additional test cases, feel free to ask for them.

@lvlcn-t lvlcn-t requested a review from aymanbagabas as a code owner April 5, 2024 20:13
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.48%. Comparing base (2338a13) to head (5e028ac).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #117      +/-   ##
==========================================
- Coverage   80.92%   80.48%   -0.44%     
==========================================
  Files          11       11              
  Lines         739      656      -83     
==========================================
- Hits          598      528      -70     
+ Misses        126      112      -14     
- Partials       15       16       +1     

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

@aymanbagabas aymanbagabas merged commit 2b8ec72 into charmbracelet:main Apr 22, 2024
12 of 13 checks passed
@aymanbagabas
Copy link
Member

Thank you @lvlcn-t!

@lvlcn-t lvlcn-t deleted the fix/custom-slog-levels branch April 23, 2024 11:16
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.

Support custom log levels in slog.Handler Implementation
2 participants