Skip to content

refactor: use kermit-io for file logging (WPB-26806) - #5231

Open
yamilmedina wants to merge 3 commits into
developfrom
refactor/file-logging-aproach
Open

refactor: use kermit-io for file logging (WPB-26806) #5231
yamilmedina wants to merge 3 commits into
developfrom
refactor/file-logging-aproach

Conversation

@yamilmedina

@yamilmedina yamilmedina commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

https://wearezeta.atlassian.net/browse/WPB-26806


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Some devices produces zero bytes logs due to vendor oem restrictions.

Causes (Optional)

The current implementation of our file logger relies on spinning off a process that runs logcat and attaches this output to a file log.

Solutions

While in the past we dealt with this issue, since it was blocking the app startup, now this enables logs on them as well by using kermit-io and it's RollingFileWritter made for this purpose.

Dependencies (Optional)

We need to stick to version 2.0.5 given a datetime constraint coming from kalium, which creates conflict resolution if upgrade to latest 2.1.0


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@yamilmedina
yamilmedina requested a review from a team as a code owner August 28, 2026 11:02
@yamilmedina
yamilmedina requested review from ohassine and valerio-bettini and removed request for a team August 28, 2026 11:02
@yamilmedina yamilmedina changed the title refactor: use kermitio for file logging (WPB-26806) refactor: use kermit-io for file logging (WPB-26806) Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Test Results

2 643 tests  +22   2 643 ✅ +22   1m 41s ⏱️ +22s
  337 suites + 4       0 💤 ± 0 
  337 files   + 4       0 ❌ ± 0 

Results for commit 6c180d5. ± Comparison against base commit 007c1bb.

This pull request removes 2 and adds 24 tests. Note that renamed tests count towards both.
com.wire.android.feature.meetings.ui.options.MeetingOptionsMenuViewModelTest ‑ givenPastMeeting_andSelfUserIsCreator_whenObserving_thenEditAndDeleteIsNotAvailable()
com.wire.android.ui.home.HomeTopLevelNavigation3Test ‑ givenWhatsNewItems_whenMapped_thenOnlySemanticNavigation3TargetsCrossTheHomeBoundary()
com.wire.android.feature.meetings.ui.create.MeetingsNavigation3SourceTest ‑ meetings Home root owns a framework neutral action bundle()
com.wire.android.feature.meetings.ui.create.NewMeetingViewModelTest ‑ givenEditTypeWithStartAndEndTimesInPast_whenSubmitUpdateIsCalled_thenPastTimesAreAllowedAndMeetingIsEdited()
com.wire.android.feature.meetings.ui.create.NewMeetingViewModelTest ‑ givenScheduleTypeWithStartAndEndTimesInPast_whenSubmitCreationIsCalled_thenPastTimeErrorsAreShownAndMeetingIsNotCreated()
com.wire.android.feature.meetings.ui.options.MeetingOptionsMenuViewModelTest ‑ givenPastMeeting_andSelfUserIsCreator_whenObserving_thenEditIsNotAvailableAndDeleteForEveryoneIsAvailable()
com.wire.android.feature.meetings.ui.options.MeetingOptionsMenuViewModelTest ‑ givenPastMeeting_andSelfUserIsMember_whenObserving_thenEditAndDeleteIsNotAvailable()
com.wire.android.navigation.runtime.WireNavigation3ProductionActionsTest ‑ given conversation list start action, when invoked, then typed new-conversation route is navigated()
com.wire.android.ui.WireActivityNewIntentCallerTest ‑ givenAndroid14_whenReplacingIntent_thenUsesLegacyIntentSetter
com.wire.android.ui.WireActivityNewIntentCallerTest ‑ givenAndroid15_whenReplacingIntent_thenRetainsCurrentCaller
com.wire.android.ui.home.HomeTopLevelNavigation3Test ‑ givenHomeShellActions_whenDefiningNavigation_thenChildNavigationIsOnlyExposedThroughTopLevel()
com.wire.android.ui.home.HomeTopLevelNavigation3Test ‑ givenHomeTopLevelActions_whenDefiningChildNavigation_thenEveryChildUsesAnOwnedContract()
…

♻️ This comment has been updated with latest results.

@github-actions

Copy link
Copy Markdown
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@yamilmedina
yamilmedina requested review from saleniuk and removed request for valerio-bettini August 28, 2026 12:18
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.00000% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.87%. Comparing base (604ecd9) to head (6c180d5).
⚠️ Report is 16 commits behind head on develop.

Files with missing lines Patch % Lines
...com/wire/android/util/logging/LogFileWriterImpl.kt 69.76% 3 Missing and 23 partials ⚠️
...om/wire/android/ui/debug/LogManagementViewModel.kt 0.00% 3 Missing ⚠️
...in/com/wire/android/ui/debug/UserDebugViewModel.kt 0.00% 3 Missing ⚠️
...rc/main/kotlin/com/wire/android/WireApplication.kt 83.33% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (67.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5231      +/-   ##
===========================================
+ Coverage    52.46%   52.87%   +0.41%     
===========================================
  Files          739      743       +4     
  Lines        25729    25717      -12     
  Branches      4220     4230      +10     
===========================================
+ Hits         13498    13598     +100     
+ Misses       10940    10801     -139     
- Partials      1291     1318      +27     
Files with missing lines Coverage Δ
...lin/com/wire/android/util/logging/LogFileWriter.kt 0.00% <ø> (ø)
...m/wire/android/util/logging/LogFileWriterConfig.kt 75.00% <100.00%> (+75.00%) ⬆️
...rc/main/kotlin/com/wire/android/WireApplication.kt 4.80% <83.33%> (+0.92%) ⬆️
...om/wire/android/ui/debug/LogManagementViewModel.kt 0.00% <0.00%> (ø)
...in/com/wire/android/ui/debug/UserDebugViewModel.kt 0.00% <0.00%> (ø)
...com/wire/android/util/logging/LogFileWriterImpl.kt 70.11% <69.76%> (+70.11%) ⬆️

... and 24 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 604ecd9...6c180d5. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants