Skip to content

[runtime] Rename monodroid logcat tags to DOTNET - #13532

Merged
jonathanpeppers merged 3 commits into
mainfrom
jonathanpeppers-runtime-log-tag-rename
Nov 13, 2026
Merged

jonathanpeppers merged 3 commits into
mainfrom
jonathanpeppers-runtime-log-tag-rename

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Runtime logcat tags still use the old monodroid name. Use DOTNET and DOTNET-* across native, managed, and Java logging on CoreCLR and NativeAOT. The uppercase prefix matches Console.WriteLine and native logging in dotnet/runtime. Keep log levels, category selection, and message text unchanged. Update the default dotnet run filter, timing scripts, and documentation, including instructions for existing logcat filters.

Extend existing device tests to check native warning, managed timing, and Java error tags on both runtimes. Save, clear, and restore device logging properties so existing device settings cannot override the bundled test values. No new test cases or application builds.

Fixes #13115.

Latest local validation on Windows:

  • .\dotnet-local.cmd build Microsoft.Android.slnx -nodeReuse:false -v:quiet -clp:ErrorsOnly -bl:bin\BuildDebug\runtime-uppercase-tags.binlog — passed, 0 errors (38 warnings).
  • .\dotnet-local.cmd build src\Mono.Android\Mono.Android.csproj -p:IncludeAndroidJavadoc=true -nodeReuse:false -v:quiet -clp:ErrorsOnly -bl:bin\BuildDebug\runtime-uppercase-tags-docs.binlog — passed.
  • .\dotnet-local.cmd build Microsoft.Android.slnx -t:BuildExtraApiLevels -p:IncludeAndroidJavadoc=true -nodeReuse:false -v:quiet -clp:ErrorsOnly -bl:bin\BuildDebug\runtime-uppercase-tags-extra-api.binlog — passed.
  • .\dotnet-local.cmd build build-tools\create-packs\Microsoft.Android.Sdk.proj -t:ConfigureLocalWorkload -nodeReuse:false -v:quiet -clp:ErrorsOnly -bl:bin\BuildDebug\runtime-uppercase-tags-workload.binlog — passed after generating the required reference XML documentation.
  • .\dotnet-local.cmd test bin\TestDebug\net11.0\Xamarin.Android.Build.Tests.dll --filter Name~RunWithLoggingEnablesManagedTimingLogger --logger "console;verbosity=minimal" — 1 passed.
  • .\dotnet-local.cmd test bin\TestDebug\MSBuildDeviceIntegration\net11.0\MSBuildDeviceIntegration.dll --filter "Name~FatalManagedExceptionTerminatesProcess|Name~MissingNativeLibraryHasUsefulErrorMessage" --logger "console;verbosity=minimal" --logger "trx;LogFileName=runtime-uppercase-tags.trx" --results-directory bin\TestDebug\TestResults — 4 passed on a Pixel 5 (arm64): both tests on CoreCLR and NativeAOT. Used JDK 21 through JAVA_HOME and TEST_ANDROID_JDK_PATH.

The property-isolation fix was also checked with conflicting and empty device settings on both runtimes; all four runs passed and restoration was verified. Other device ABIs were not tested.

Use current product naming for managed, native, and Java logcat tags. Preserve log levels, category selection, and message text. Update dependent filters, timing scripts, and migration guidance.

Extend existing CoreCLR and NativeAOT device cases to check native, managed, and Java log tags without adding application builds.

Fixes #13115

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Existing device properties can override the test’s bundled settings, suppressing the timing marker or breaking the exact-count assertion and causing false failures.

1 open issue
What changed in this PR

Renames .NET for Android’s runtime logcat tags from monodroid to dotnet across CoreCLR and NativeAOT, addressing #13115 while preserving log levels, category selection, and message text.

Changes:

  • Updates native, managed, and Java logging tags.
  • Aligns the default run filter, timing scripts, and documentation, including filter migration guidance.
  • Extends existing device tests to check native warning, managed timing, and Java error tags on both runtimes.
File Description
tests/​MSBuildDeviceIntegration/​Tests/​UncaughtExceptionTests.cs Adds native GC warning and managed timing tag assertions.
tests/​MSBuildDeviceIntegration/​Tests/​NativeLibraryLoadTests.cs Requires library-load diagnostics to use the error-level dotnet tag.
src/​Xamarin.Android.Build.Tasks/​Microsoft.Android.Sdk/​targets/​Microsoft.Android.Sdk.Application.targets Updates the default assembly-log suppression filter.
src/​native/​clr/​include/​constants.hh Renames native logcat category tags.
src/​Mono.Android/​Xamarin.Android.Net/​AndroidMessageHandler.cs Renames the managed networking tag.
src/​Mono.Android/​Microsoft.Android.Runtime/​TrimmableTypeMapValueManager.cs Updates the cast-diagnostic tag.
src/​Mono.Android/​Microsoft.Android.Runtime/​JniRemappingLookup.cs Updates JNI remapping diagnostic tags.
src/​Mono.Android/​Microsoft.Android.Runtime/​JavaMarshalGCBridgeJni.cs Updates GC bridge error tags.
src/​Mono.Android/​Microsoft.Android.Runtime/​JavaMarshalGCBridge.cs Updates GC bridge diagnostic tags.
src/​Mono.Android/​Java.Lang/​Throwable.cs Updates the cleanup-error tag.
src/​Mono.Android/​Android.Runtime/​TimingLogger.cs Renames the timing tag and updates its API documentation.
src/​Mono.Android/​Android.Runtime/​ManagedObjectReferenceManager.cs Updates the global-reference warning tag.
src/​Mono.Android/​Android.Runtime/​JNIEnvInit.cs Updates startup-hook warning tags.
src/​Mono.Android/​Android.Runtime/​JNIEnv.cs Updates exception and class-lookup tags, including MonoDroid.
src/​Mono.Android/​Android.App/​SyncContext.cs Renames the synchronization-context error tag.
src/​Microsoft.Android.Run/​Program.cs Updates the logcat-filter help example.
src/​java-runtime/​java/​mono/​android/​NativeLibraryHelper.java Renames the Java library-load diagnostic tag.
Documentation/​workflow/​SystemProperties.md Documents renamed tags and migration of existing filters.
Documentation/​guides/​profiling.md Updates managed timing documentation and filtering examples.
build-tools/​scripts/​TimingDefinitions.txt Updates timing-match expressions to the renamed tag.

Review effort: Balanced

Save and clear device overrides before launching the fatal-exception app, then restore them in finally. Attempt both restores even if one fails.

Co-authored-by: Copilot App <[email protected]>
Use an uppercase DOTNET prefix for runtime logcat tags to match Console.WriteLine and native logging in dotnet/runtime. Update category tags, filters, scripts, tests, and docs consistently.

Co-authored-by: Copilot App <[email protected]>
@jonathanpeppers jonathanpeppers changed the title [runtime] Rename monodroid logcat tags to dotnet [runtime] Rename monodroid logcat tags to DOTNET Nov 13, 2026
@jonathanpeppers
jonathanpeppers merged commit ab261c3 into main Nov 13, 2026
40 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-runtime-log-tag-rename branch November 13, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename monodroid logcat tags to dotnet

3 participants