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

log: avoid setting default slog logger in init #1877

Merged
merged 1 commit into from
Jan 1, 2024
Merged

log: avoid setting default slog logger in init #1877

merged 1 commit into from
Jan 1, 2024

Conversation

ucwong
Copy link
Member

@ucwong ucwong commented Jan 1, 2024

slog.SetDefault has undesirable side effects. It also sets the default logger destination, for example. So we should not call it by default in init.

slog.SetDefault has undesirable side effects. It also sets the default logger destination,
for example. So we should not call it by default in init.
Copy link

codecov bot commented Jan 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (635bb4d) 52.80% compared to head (f86cc65) 52.78%.
Report is 444 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1877      +/-   ##
==========================================
- Coverage   52.80%   52.78%   -0.02%     
==========================================
  Files         493      493              
  Lines       60529    60528       -1     
==========================================
- Hits        31960    31949      -11     
- Misses      26132    26137       +5     
- Partials     2437     2442       +5     
Files Coverage Δ
log/root.go 8.69% <100.00%> (-20.48%) ⬇️

... and 14 files with indirect coverage changes

@ucwong ucwong marked this pull request as ready for review January 1, 2024 11:34
@ucwong ucwong merged commit 80e7ac0 into master Jan 1, 2024
1 check passed
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.

2 participants