You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
moq-tokio: Rust logs never reach logcat on Android because no build enables android-logcat #4456
moq_tokio::Log::init routes logs to logcat only when the android-logcat feature is enabled, and to stderr otherwise. Android app processes discard stderr, so without the feature every Rust log is lost.
No shipped build enables the feature (at a0929c90b):
rs/moq-tokio/src/log.rs:69: the logcat layer is gated on all(target_os = "android", feature = "android-logcat").
rs/libmoq/Cargo.toml: there is no [features] section, so a C API consumer cannot enable it.
rs/moq-ffi/Cargo.toml:29: android-logcat is declared but not in default, and rs/moq-ffi/build.sh:133 builds Android targets without it. release-kt-ffi.yml and release-dart-ffi.yml call that script, so the published Kotlin and Dart bindings log to stderr on Android too.
Measured behavior
On an Android device, with libmoq built with the gate removed and no extra features, moq_log_level("info") sends logs to logcat:
W MoQNative: moq_tokio::tls: TLS server certificate verification is disabled; ...
I MoQNative: moq_tokio::client: connected version=moq-lite-05
Possible approaches
Always use logcat on Android. Gate the layer on target_os = "android" alone, make tracing-android a regular Android-only dependency, and remove the android-logcat feature from moq-tokio and moq-ffi. Other targets are unaffected, and logging stays opt-in at runtime because Log::init runs only when the app calls moq_log_level. This is a breaking change: builds that pass --features android-logcat stop resolving.
Keep the feature and enable it where it is missing. Add android-logcat = ["moq-tokio/android-logcat"] to libmoq, and pass it in moq-ffi/build.sh for Android targets. Not breaking, but every Android consumer still has to know to turn it on.
I have (1) working locally and can send a PR for either; since (1) is breaking, I'd like your call before opening it.
The published dev.moq:moq-ffi-android 0.4.8 confirms this: its libmoq_ffi.so does not link liblog and contains no _android_log* import or MoQNative tag.
Decision: option 1. On Android the logcat layer is gated on target_os = "android" alone, and the android-logcat feature is removed from moq-tokio and moq-ffi with no no-op feature kept. Removing a feature from published crates is a break, so the PR targets dev. The quest also adds a CI check that the Android .so imports __android_log_*.
@pwrwpw, you offered a PR for this; it's welcome against dev. Please close this issue from it.
Activity
pwrwpw commentedon Sep 29, 2026
The published dev.moq:moq-ffi-android 0.4.8 confirms this: its libmoq_ffi.so does not link liblog and contains no _android_log* import or MoQNative tag.
quest(m1): plan #4456, #4508, #4581, #4582 (#4587)
kixelated commentedon Sep 30, 2026
Planned in #4587 as
quest/m1/android-logcat.md.Decision: option 1. On Android the logcat layer is gated on
target_os = "android"alone, and theandroid-logcatfeature is removed frommoq-tokioandmoq-ffiwith no no-op feature kept. Removing a feature from published crates is a break, so the PR targetsdev. The quest also adds a CI check that the Android.soimports__android_log_*.@pwrwpw, you offered a PR for this; it's welcome against
dev. Please close this issue from it.(Written by Claude Opus 5.5)