VIDSOL-671: Android File Logger#112
Conversation
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
…evels are sent, as per spec
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ctionsTest.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ge for log settings so it's remembered
manolovn
left a comment
There was a problem hiding this comment.
please review copilot comments and fix merge conflicts
Applied Copilot suggestions |
🎭 Maestro UI Test Results❌ Some tests failed
📊 Artifacts:
📸 View the complete test results and screenshots in the artifacts section above. |
🎭 Maestro UI Test Results❌ Some tests failed
📊 Artifacts:
📸 View the complete test results and screenshots in the artifacts section above. |
🎭 Maestro UI Test Results❌ Some tests failed
📊 Artifacts:
📸 View the complete test results and screenshots in the artifacts section above. |
🎭 Maestro UI Test Results❌ Some tests failed
📊 Artifacts:
📸 View the complete test results and screenshots in the artifacts section above. |
|
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:
This occurs because the Please review the Maestro implementation, specifically ensuring that the tag is added to your TwoPaneScaffold(
modifier = modifier
.fillMaxSize()
.testTag(LANDING_SCREEN_TAG),
...
)Also, make sure the constant is defined in const val LANDING_SCREEN_TAG = "landing_screen"This file is located in Adding this back should resolve the issue. Please let me know if you need any help. |
🎭 Maestro E2E Test Results❌ Some tests failed
📊 Artifacts:
📸 View the complete test results and screenshots in the artifacts section above. |
1 similar comment
🎭 Maestro E2E Test Results❌ Some tests failed
📊 Artifacts:
📸 View the complete test results and screenshots in the artifacts section above. |
What is this PR doing?
How should this be manually tested?
Run the app, share the logs
What are the relevant tickets?
VIDSOL-
Checklist
develop(notmain).Known Issue.docs/KNOWN_ISSUES.md?Issues.Justification for skipping ci, if applied?