On Mon Mar 9 17:23:37 2026 +0000, Twaik Yont wrote:
The intention here is not to rely on logcat as a post-mortem log store. In practice the expected workflow is to collect logs while the application is running. Android tooling is generally designed around that model. For example Android Studio launches the app itself (either normally or under the debugger) and continuously collects the logcat stream, so the ring buffer size is not a practical limitation because the logs are already being consumed and stored externally. The same approach works from the command line as well, e.g.: ``` adb shell am start -n org.winehq.wine/.WineActivity && adb logcat ... | tee log.txt ``` This allows capturing the entire output stream to a file while the application runs, without any need to collect the file with root or `adb shell run-as` + `cat` approach, making it available immediately on screen and in file on pc. There is also a practical reason not to encourage large persistent log files on-device: with many WINEDEBUG options enabled the log volume can grow very quickly and consume significant storage. Streaming the logs through logcat and capturing them externally avoids that issue. Would it be acceptable to keep the file log as well and simply add logcat as an additional sink?
Instead of setting `WINEDEBUGLOG` explicitly, the Android code could check for the presence of the existing `log` file and, if it exists, open it and write to it alongside `logcat` (truncating it at startup). This would preserve the ability to download and inspect a full log file off-device while also exposing the same output through logcat for live debugging with adb or Android Studio. The implementation would stay simple: the pipe reader thread that forwards output to logcat could also write the same data to the file if it was successfully opened. This keeps the existing offline debugging workflow while making the logs immediately visible through standard Android tooling. This way the change does not replace the file-based logging but only augments it with a logcat stream. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10276#note_131615