Skip to content

Use the loglevel library's extensions #1592

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

Merged
merged 2 commits into from
Sep 26, 2023
Merged

Use the loglevel library's extensions #1592

merged 2 commits into from
Sep 26, 2023

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Sep 25, 2023

...instead of monkey patching the console log objects. We use a logging framework everywhere now (this fixes the times when we didn't...) so there's not really a reason to do this the hacky way anymore.

This means that log lines now appear to come from whatever else is intercepting the logger (eg. sentry) rather than rageshake.ts.

Opinions on this welcome on whether it's better or not.

...instead of monkey patching the console log objects. We use a logging
framework everywhere now (this fixes the times when we didn't...)
so there's not really a reason to do this the hacky way anymore.

This means that log lines now appear to come from whatever else is
intercepting the logger (eg. sentry) rather than rageshake.ts.

Opinions on this welcome on whether it's better or not.
@dbkr dbkr added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Sep 25, 2023
@dbkr dbkr requested a review from a team as a code owner September 25, 2023 17:08
Copy link
Member

@robintown robintown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution definitely feels cleaner to me, and I especially appreciate the lint rule being in place to keep us from accidentally using console 👍

Co-authored-by: Robin <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (6bc8ccf) 27.17% compared to head (31446e7) 27.14%.
Report is 26 commits behind head on livekit.

Additional details and impacted files
@@             Coverage Diff             @@
##           livekit    #1592      +/-   ##
===========================================
- Coverage    27.17%   27.14%   -0.03%     
===========================================
  Files           50       50              
  Lines         2035     2037       +2     
  Branches       340      342       +2     
===========================================
  Hits           553      553              
- Misses        1442     1444       +2     
  Partials        40       40              
Flag Coverage Δ
unittests 27.14% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/FullScreenView.tsx 0.00% <0.00%> (ø)
src/matrix-utils.ts 6.93% <0.00%> (ø)
src/settings/submit-rageshake.ts 0.78% <0.00%> (ø)
src/settings/rageshake.ts 1.45% <0.00%> (-0.02%) ⬇️

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants