This change redirects Wine’s `stdout` and `stderr` to Android `logcat` when running through the Java entry point used by `wineandroid.drv`. Currently `WineActivity` writes debug output to a file via the `WINEDEBUGLOG` mechanism. In practice this is inconvenient to use: the file lives in the application's private storage and reading it on a device typically requires either a debug build or root access. Even when accessible, inspecting logs directly on the device is less practical than using Android’s standard logging tools. Android applications normally expose diagnostic output through logcat. This change forwards Wine’s `stdout` and `stderr` to `logcat` so that Wine debug output can be observed using standard Android tooling (`adb logcat`, Android Studio, etc.) without accessing the application’s internal storage. The implementation is intentionally simple and best-effort. A pipe is installed on `stdout` and `stderr` and a small detached thread forwards the output to `__android_log_write()`. Data is forwarded in chunks without reconstructing line boundaries; this is sufficient for diagnostic purposes and keeps the implementation minimal. The redirection is only enabled in the Android Java startup path, which corresponds to the environment used by `wineandroid`. In this configuration `stdout` and `stderr` are typically not visible to the user (commonly pointing to `/dev/null`), so redirecting them to logcat does not replace any usable diagnostics channel. It is also unlikely that Wine will be compiled directly on Android devices in practice. Android does not provide an official NDK toolchain that runs on-device, and mingw toolchains are not distributed for Android either. Building Wine therefore normally happens off-device using standard cross-compilation toolchains (android NDK, mingw, host toolchain). Because of this, the `logcat` forwarding is primarily intended for runtime diagnostics and debugging rather than build-time development directly on the device. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10276