[android] Add runtime logging support for CoreCLR on Android
@lateralusX is already working on this.
Since Feb 27, 2025.
Assessment
This issue has not been assessed yet.
Description
Description
This issue is made for tracking necessary work for enabling runtime logging for CoreCLR on Android.
Logging
Currently, most of the messages logged by the runtime end up in /dev/null (either because they
are disabled in release build or because they log to stdio which doesn't work on Android).
Logcat is the only way to get information from remote devices, especially via Google Play Console.
We should log to logcat:
- C++ exception messages
- abort() messages / fatal errors
- warnings
- errors
A subsystem should be added which will provide a single function that will do actual output, implementation of which
will be specific to the platform. API should allow specification of severity, the actual message, and possibly a flag
to indicate whether the process should be aborted (the decision might also be based on the severity). Severity should
be shared between all targets, which then can (if needed) translate it to the target platform's value(s), if any.
Tasks
- Enable JIT logging: https://github.com/dotnet/runtime/pull/112677, https://github.com/dotnet/runtime/pull/113416
- Fatal error logging: https://github.com/dotnet/runtime/pull/112705, https://github.com/dotnet/runtime/pull/113416
- Enable runtime logging: https://github.com/dotnet/runtime/pull/113416, https://github.com/dotnet/runtime/pull/113916
- Figure out how to enable stress log on Android.
- Investigate runtime crash dumps on Android, implement custom version of PROCCreateCrashDumpIfEnabled for Android.
- Android platform unwinder can't unwind through managed frames. Investigate possibility to register minimal unwind info for managed frames making sure Android platform unwinder can produce complete stack traces in bug reports.
- Consolidate native logging in minipal: https://github.com/dotnet/runtime/pull/113416
References on runtime logging
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSResourceGet#2056 ·