Skip to content

Allow embedded builds to compile out internal logging - #1533

Open
bmehta001 wants to merge 3 commits into
microsoft:mainfrom
bmehta001:bhamehta/compile-out-internal-logging
Open

Allow embedded builds to compile out internal logging#1533
bmehta001 wants to merge 3 commits into
microsoft:mainfrom
bmehta001:bhamehta/compile-out-internal-logging

Conversation

@bmehta001

@bmehta001 bmehta001 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a supported MATSDK_DISABLE_LOGGING CMake option
  • propagate it through the internal target configuration and Android Gradle wrapper
  • compile logging-only PAL and JNI diagnostics out cleanly with warnings-as-errors
  • remove Android's liblog dependency when internal logging is disabled
  • document the option and exercise it in the source-embedding CI matrix

This lets embedded consumers remove internal SDK diagnostics without patching 1DS and without disabling telemetry collection or upload.

Validation

  • Android Gradle JNI build with logging disabled across all configured ABIs
  • verified disabled Android static and shared outputs have no __android_log* references or liblog dependency
  • Android arm64 JNI builds with logging enabled and disabled
  • Linux static builds with logging enabled and disabled, both with warnings-as-errors
  • Windows Visual Studio 2026 Release build with logging disabled and warnings-as-errors
  • git diff --check

Expose MATSDK_DISABLE_LOGGING so consumers can remove diagnostic logging without patching 1DS or disabling telemetry upload.

Files changed:
- CMake option and internal target configuration
- default logging feature selection and PAL warning fixes
- embedding documentation and CI coverage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 49c171ca-76ba-4688-afaf-df59129cda4f
@bmehta001
bmehta001 requested a review from a team as a code owner September 10, 2026 07:02
bmehta001 and others added 2 commits September 10, 2026 11:31
Honor MATSDK_DISABLE_LOGGING in the Android PAL path so embedded builds do not retain internal Logcat output or its header dependency.

Files changed:
- lib/pal/PAL.cpp

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Honor MATSDK_DISABLE_LOGGING across the JNI wrapper and remove the unused liblog dependency so Android embedding builds retain no internal Logcat path.

Files changed:
- lib/CMakeLists.txt
- lib/android_build/maesdk/build.gradle
- lib/jni/LogManager_jni.cpp

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0ab71a08-8e5c-4fdd-ae7e-466debb4860f
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.

1 participant