Skip to content

Guard telemetry events (MW_LOG_MIL) with #ifdef PLAYER_TELEMETRY_SUPPORT#121

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/update-telemetry-supportifdef
Draft

Guard telemetry events (MW_LOG_MIL) with #ifdef PLAYER_TELEMETRY_SUPPORT#121
Copilot wants to merge 2 commits intomainfrom
copilot/update-telemetry-supportifdef

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 26, 2026

MW_LOG_MIL (Milestone log) is the telemetry event channel — it maps to ETHAN_LOG_MILESTONE, the only level that passes through Ethan logger in production builds. All MW_LOG_MIL call sites now compile out when telemetry support is disabled.

Changes

  • playerLogManager/PlayerLogManager.h: Wrap MW_LOG_MIL macro definition with #ifdef PLAYER_TELEMETRY_SUPPORT; falls back to a no-op when not defined:
#ifdef PLAYER_TELEMETRY_SUPPORT
#define MW_LOG_MIL(FORMAT, ...)   MW_LOG(mLOGLEVEL_MIL, FORMAT, ##__VA_ARGS__)
#else
#define MW_LOG_MIL(FORMAT, ...)   do {} while(0)
#endif
  • CMakeLists.txt: Add PLAYER_TELEMETRY_SUPPORT cmake option (default OFF) that injects -DPLAYER_TELEMETRY_SUPPORT into compile definitions:
option(PLAYER_TELEMETRY_SUPPORT "Enable player telemetry support" OFF)
if(PLAYER_TELEMETRY_SUPPORT)
    set(LIBPLAYERGSTINTERFACE_DEFINES "${LIBPLAYERGSTINTERFACE_DEFINES} -DPLAYER_TELEMETRY_SUPPORT")
endif()

Enable at configure time with -DPLAYER_TELEMETRY_SUPPORT=ON. Guarding the macro definition rather than individual call sites means all existing and future MW_LOG_MIL usages are automatically covered.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Update code to include PLAYER_TELEMETRY_SUPPORT for telemetry events Guard telemetry events (MW_LOG_MIL) with #ifdef PLAYER_TELEMETRY_SUPPORT Mar 26, 2026
Copilot AI requested a review from dp0000 March 26, 2026 11:28
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.

2 participants