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: use charm/logger #116

Merged
merged 5 commits into from
Mar 10, 2023
Merged

feat: use charm/logger #116

merged 5 commits into from
Mar 10, 2023

Conversation

caarlos0
Copy link
Member

This uses charmbracelet/log everywhere.

There is the question of what should we do with the breaking changes in logging and recover...

We could keep the old ones and deprecated them, and then add new ones with another names... but I couldn't think of any good names... ideas?

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 requested review from aymanbagabas and toby and removed request for aymanbagabas February 22, 2023 19:12
@caarlos0 caarlos0 self-assigned this Feb 22, 2023
@caarlos0 caarlos0 added the enhancement New feature or request label Feb 22, 2023
@codecov
Copy link

codecov bot commented Feb 22, 2023

Codecov Report

Merging #116 (71e91c7) into main (d7c49d2) will increase coverage by 3.34%.
The diff coverage is 93.10%.

@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
+ Coverage   72.65%   76.00%   +3.34%     
==========================================
  Files          18       17       -1     
  Lines         918      900      -18     
==========================================
+ Hits          667      684      +17     
+ Misses        197      162      -35     
  Partials       54       54              
Impacted Files Coverage Δ
git/git.go 61.97% <0.00%> (ø)
options.go 78.89% <66.66%> (ø)
logging/logging.go 100.00% <100.00%> (ø)
ratelimiter/ratelimiter.go 94.87% <100.00%> (ø)
recover/recover.go 95.65% <100.00%> (+0.91%) ⬆️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@aymanbagabas
Copy link
Member

This uses charmbracelet/log everywhere.

There is the question of what should we do with the breaking changes in logging and recover...

We could keep the old ones and deprecated them, and then add new ones with another names... but I couldn't think of any good names... ideas?

We could keep using *log.Logger in those. Then use the standard log adapter in charm/log log.StandardLog() in applications using these middlewares

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 merged commit 35c79d9 into main Mar 10, 2023
@caarlos0 caarlos0 deleted the log branch March 10, 2023 14:24
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