Skip to content

VIDSOL-671: Android File Logger#112

Open
HapPiNeHsSs wants to merge 17 commits into
developfrom
beejay/VIDSOL-671
Open

VIDSOL-671: Android File Logger#112
HapPiNeHsSs wants to merge 17 commits into
developfrom
beejay/VIDSOL-671

Conversation

@HapPiNeHsSs

Copy link
Copy Markdown
Contributor

What is this PR doing?

image Added Opentok logging - Added Upload Log to client-logs/batch (only info and error) - Added Share Logs (all levels) - Added toggle to turn logging on or off - Added setting Log Levels - Log file is limited to 50mb - Logs are rotated for three days

How should this be manually tested?

Run the app, share the logs

What are the relevant tickets?

VIDSOL-

Checklist

  • Branch is based on develop (not main).
  • Resolves a Known Issue.
  • If yes, did you remove the item from the docs/KNOWN_ISSUES.md?
  • Resolves an item reported in Issues.

Justification for skipping ci, if applied?

HapPiNeHsSs and others added 6 commits March 25, 2026 16:50
FileLogInterceptor modified to write max 50mb with 3 day rotation
Opentok Log Interceptor also uses Vonage Logger so it feeds into FileLogInterceptor as well
Added a Loglevel option for Vonagelogger
Updated Tests
Added Share logs in settings
…ange upload endpoint to client-logs/batch; Only upload info and error
Copilot AI review requested due to automatic review settings April 8, 2026 08:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces end-to-end client logging support (including OpenTok log capture), adds a Settings UI to control logging behavior, and enables uploading/sharing log files from the app.

Changes:

  • Add a new logger pipeline with file-based JSON logs (daily rotation, retention window, size cap) and OpenTok Logcat capture.
  • Add settings UI/actions/state to toggle logging, select log level, upload logs to client-logs/batch, and share the latest log file.
  • Add repository + API wiring for batching and uploading filtered log entries, plus FileProvider support for sharing.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
vonage-video-core/src/main/java/com/vonage/android/kotlin/Call.kt Minor formatting change near companion object.
vonage-feature-settings/src/testEnabled/java/com/vonage/android/settings/CallSettingsHolderTest.kt Update expectation for default bitrate preset.
vonage-feature-settings/src/main/java/com/vonage/android/settings/SettingsUiState.kt Add logging-related state (enabled, level, sending flag).
vonage-feature-settings/src/main/java/com/vonage/android/settings/SettingsScreenActions.kt Add logging callbacks (toggle, level change, send/share).
vonage-feature-settings/src/enabled/res/values/strings.xml Add logging section strings + upload/share messages.
vonage-feature-settings/src/enabled/java/com/vonage/android/settings/ui/SettingsScreen.kt Add logging section UI and action rows.
vonage-feature-settings/src/enabled/java/com/vonage/android/settings/ui/components/LogLevelSelector.kt New dropdown selector for log levels.
vonage-feature-settings/build.gradle.kts Add dependency on :vonage-android-logger.
vonage-android-logger/src/test/java/com/vonage/logger/VonageLoggerTest.kt Add teardown + test for min log level persistence.
vonage-android-logger/src/test/java/com/vonage/logger/interceptor/FileLogInterceptorTest.kt Rewrite tests for JSON format, daily files, retention, size cap behavior.
vonage-android-logger/src/main/java/com/vonage/logger/VonageLogger.kt Add Default logger init/config (enabled + min level) + file logging support.
vonage-android-logger/src/main/java/com/vonage/logger/interceptor/OpenTokLogcatInterceptor.kt New interceptor to capture OpenTok logs from logcat and forward into logger pipeline.
vonage-android-logger/src/main/java/com/vonage/logger/interceptor/FileLogInterceptor.kt Switch to per-day JSON log files, retention purge, and size-limiting.
vonage-android-logger/src/main/java/com/vonage/logger/interceptor/AndroidLogInterceptor.kt Add enable/min-level providers to gate Logcat output.
vonage-android-logger/build.gradle.kts Add Gson dependency for JSON log serialization.
vonage-android-logger/api/vonage-android-logger.api Update published API surface for new/changed logger APIs.
app/src/test/java/com/vonage/android/screen/settings/SettingsScreenViewModelTest.kt Add tests for logs-enabled state integration.
app/src/test/java/com/vonage/android/screen/settings/SettingsActionsTest.kt Add/adjust tests for new settings actions including send-logs.
app/src/test/java/com/vonage/android/data/ClientLogsRepositoryTest.kt New tests for enabling logs and payload-building/upload filtering.
app/src/main/res/xml/file_paths.xml Add FileProvider paths for sharing log files from app-internal storage.
app/src/main/java/com/vonage/android/screen/settings/SettingsScreenViewModel.kt Inject repository + add public methods for logging actions.
app/src/main/java/com/vonage/android/screen/settings/SettingsScreenRoute.kt Handle send/share events via Toasts + share Intent.
app/src/main/java/com/vonage/android/screen/settings/SettingsContracts.kt Add new view events + inject repository into action dependencies.
app/src/main/java/com/vonage/android/screen/settings/SettingsActions.kt Add observe/toggle/level/update/send/share actions.
app/src/main/java/com/vonage/android/MainApplication.kt Initialize default logger + enable OpenTok logging + start logcat capture.
app/src/main/java/com/vonage/android/data/network/APIService.kt Add POST client-logs/batch endpoint definition.
app/src/main/java/com/vonage/android/data/ClientLogsRepository.kt New repository: toggling logger, getting latest log URI, building/uploading payload.
app/src/main/AndroidManifest.xml Register FileProvider for sharing logs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/test/java/com/vonage/android/screen/settings/SettingsActionsTest.kt Outdated
Comment thread app/src/main/java/com/vonage/android/MainApplication.kt Outdated
Comment thread vonage-video-core/src/main/java/com/vonage/android/kotlin/Call.kt Outdated
@HapPiNeHsSs HapPiNeHsSs changed the title Beejay/vidsol 671 VIDSOL-671: Android File Logger Apr 8, 2026
HapPiNeHsSs and others added 4 commits April 8, 2026 16:35
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ctionsTest.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
manolovn
manolovn previously approved these changes May 11, 2026

@manolovn manolovn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please review copilot comments and fix merge conflicts

@HapPiNeHsSs

HapPiNeHsSs commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

please review copilot comments and fix merge conflicts

Applied Copilot suggestions

@github-actions

Copy link
Copy Markdown

🎭 Maestro UI Test Results

Some tests failed

  • Run: #15
  • Commit: a7977125b9ad1fadebe01fe77c3360ad291c1e27

📊 Artifacts:

  • maestro-test-results-15
  • maestro-report-15

📸 View the complete test results and screenshots in the artifacts section above.

@github-actions

Copy link
Copy Markdown

🎭 Maestro UI Test Results

Some tests failed

  • Run: #19
  • Commit: 9d4d268bbe8f19ac45318551ba3e5d4a9eb163d8

📊 Artifacts:

  • maestro-test-results-19
  • maestro-report-19

📸 View the complete test results and screenshots in the artifacts section above.

@github-actions

Copy link
Copy Markdown

🎭 Maestro UI Test Results

Some tests failed

  • Run: #20
  • Commit: 9eba092a5707396853ae3c7a7165bf9d0e40d27c

📊 Artifacts:

  • maestro-test-results-20
  • maestro-report-20

📸 View the complete test results and screenshots in the artifacts section above.

@github-actions

Copy link
Copy Markdown

🎭 Maestro UI Test Results

Some tests failed

  • Run: #21
  • Commit: 3e13742355ba1de048d7d0de3031e8c6da4ceed0

📊 Artifacts:

  • maestro-test-results-21
  • maestro-report-21

📸 View the complete test results and screenshots in the artifacts section above.

@jorgesanmartin-vng

Copy link
Copy Markdown
Contributor

Hi @HapPiNeHsSs, the current Maestro test appears to be failing because part of the implementation was lost during the merge.

Maestro is throwing the following error:

Assertion failed: id "landing_screen" is not visible

This occurs because the LANDING_SCREEN_TAG is missing.

Please review the Maestro implementation, specifically ensuring that the tag is added to your TwoPaneScaffold:

TwoPaneScaffold(
    modifier = modifier
        .fillMaxSize()
        .testTag(LANDING_SCREEN_TAG),
    ...
)

Also, make sure the constant is defined in LandingScreenTestTags:

const val LANDING_SCREEN_TAG = "landing_screen"

This file is located in LandingScreenRoute.

Adding this back should resolve the issue.

Please let me know if you need any help.

@vonage-ai-assistant vonage-ai-assistant Bot added ai-generated Over 80% AI contribution and removed ai-generated Over 80% AI contribution labels Jun 9, 2026
@github-actions

Copy link
Copy Markdown

🎭 Maestro E2E Test Results

Some tests failed

  • Run: #121
  • Commit: 4fedfa8337e10f3e24823c783c366f2d7809daba

📊 Artifacts:

  • maestro-test-results-121
  • maestro-report-121

📸 View the complete test results and screenshots in the artifacts section above.

1 similar comment
@github-actions

Copy link
Copy Markdown

🎭 Maestro E2E Test Results

Some tests failed

  • Run: #121
  • Commit: 4fedfa8337e10f3e24823c783c366f2d7809daba

📊 Artifacts:

  • maestro-test-results-121
  • maestro-report-121

📸 View the complete test results and screenshots in the artifacts section above.

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

Labels

ai-generated Over 80% AI contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants