Skip to content

Add feature flag to let the application prints logs to logcat in release builds. #4402

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
Mar 14, 2025

Conversation

jmartinesp
Copy link
Member

@jmartinesp jmartinesp commented Mar 12, 2025

Content

Logs in logcat are enabled now by default in debug and nightly builds based on a new feature flag that can be toggled in the developer options screen, so they can be temporarily enabled in release builds if necessary, while they're disabled by default on those.

Motivation and context

Fixes #4011.

Screenshots

image

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@jmartinesp jmartinesp added the PR-Misc For other changes label Mar 12, 2025
@jmartinesp jmartinesp requested a review from a team as a code owner March 12, 2025 17:53
@jmartinesp jmartinesp requested review from bmarty and removed request for a team March 12, 2025 17:53
@jmartinesp jmartinesp force-pushed the misc/enable-logcat-in-all-builds branch from 17b9702 to 0111816 Compare March 12, 2025 17:53
@jmartinesp jmartinesp force-pushed the misc/enable-logcat-in-all-builds branch from 0111816 to b73c447 Compare March 12, 2025 17:53
Copy link
Contributor

github-actions bot commented Mar 12, 2025

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/X8GszQ

Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.10%. Comparing base (c381794) to head (f01078b).
Report is 12 commits behind head on develop.

Files with missing lines Patch % Lines
...lement/android/x/initializer/TracingInitializer.kt 0.00% 2 Missing ⚠️
.../android/libraries/featureflag/api/FeatureFlags.kt 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4402      +/-   ##
===========================================
- Coverage    80.10%   80.10%   -0.01%     
===========================================
  Files         2063     2063              
  Lines        55180    55187       +7     
  Branches      6765     6766       +1     
===========================================
+ Hits         44201    44206       +5     
- Misses        8664     8665       +1     
- Partials      2315     2316       +1     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bmarty
Copy link
Member

bmarty commented Mar 12, 2025

I do not agree with this change, and I have commented the issue here #4011 (comment)

… or not

This is done so it can be temporarily enabled on release builds for quick debugging sessions, then disabled again.
@jmartinesp
Copy link
Member Author

The new changes should be more aligned with what we agreed on, I've updated the description of the PR too.

Copy link

@bmarty bmarty changed the title Enable printing logs to logcat in nightly and release builds Add feature flag to let the application prints logs to logcat in release builds. Mar 14, 2025
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks for the update!

@bmarty bmarty merged commit 4a2a675 into develop Mar 14, 2025
36 of 37 checks passed
@bmarty bmarty deleted the misc/enable-logcat-in-all-builds branch March 14, 2025 10:33
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.

Make debug logs available through adb logcat in release builds
2 participants