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

Add MXLog.dev for faster print debugging. #3694

Merged
merged 2 commits into from
Jan 22, 2025
Merged

Add MXLog.dev for faster print debugging. #3694

merged 2 commits into from
Jan 22, 2025

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Jan 21, 2025

Rather than doing MXLog.info("[DOUG] Something happened") in a bunch of places (to then filter the console on [DOUG]), this PR adds MXLog.dev("Something happened") which automatically prefixes the current user's name (from their home directory) to the log.

Only available in DEBUG mode, and probably not useful on a device.

The second commit removes the context from MXLog as it is completely unused and seems unlikely we'll hook it up any time soon given what is available from Rust.

@pixlwave pixlwave added the pr-misc for other changes label Jan 21, 2025
@pixlwave pixlwave requested a review from a team as a code owner January 21, 2025 17:48
@pixlwave pixlwave requested review from Velin92 and removed request for a team January 21, 2025 17:48
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 78.69%. Comparing base (909ee4a) to head (e726d81).
Report is 1 commits behind head on develop.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
ElementX/Sources/Other/Logging/MXLog.swift 68.75% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3694      +/-   ##
===========================================
+ Coverage    78.67%   78.69%   +0.02%     
===========================================
  Files          792      792              
  Lines        67731    67734       +3     
===========================================
+ Hits         53285    53306      +21     
+ Misses       14446    14428      -18     
Flag Coverage Δ
unittests 70.20% <68.75%> (-0.02%) ⬇️

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

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

Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

🙌

@pixlwave pixlwave merged commit f194285 into develop Jan 22, 2025
13 checks passed
@pixlwave pixlwave deleted the doug/mxlog-dev branch January 22, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-misc for other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants