Skip to content

mxc-diagnostic-console: add --collect flag for log capture#307

Merged
jsidewhite merged 4 commits into
mainfrom
jsidewhite/mxc_diagnostic_console_dashdash_collect
May 15, 2026
Merged

mxc-diagnostic-console: add --collect flag for log capture#307
jsidewhite merged 4 commits into
mainfrom
jsidewhite/mxc_diagnostic_console_dashdash_collect

Conversation

@jsidewhite

@jsidewhite jsidewhite commented May 14, 2026

Copy link
Copy Markdown
Member

Summary

Adds a --collect option to mxc-diagnostic-console.exe that captures both verbose and minified diagnostic logs to files in %TEMP%, then zips them on exit.

Add LearningModeViolations (eg. GUI accessed!)

image

Behavior

  • mxc-diagnostic-console.exe --collect creates a folder ontaining:
    • verbose.log -- full ETW event properties
    • minified.log -- reduced ETW event properties
  • Console output continues normally while collecting
  • Ctrl+C flushes logs, zips the folder via PowerShell Compress-Archive, and prints the paths
  • A second Ctrl+C forces immediate exit (escape hatch if finalization hangs)

Implementation notes

  • Refactored ETW decoding: TDH property extraction done once per event, then formatted independently for each display mode (avoids double TDH calls)
  • minify_access_check_props now takes an explicit DisplayMode parameter instead of reading the global
  • ANSI escape codes stripped before writing to log files
  • Works correctly with --collect --verbose (console shows verbose, both log formats still captured independently)
Microsoft Reviewers: Open in CodeFlow

Add a --collect option to mxc-diagnostic-console that captures both
verbose and minified log output to timestamped files in %TEMP%.

- Creates mxc-diagnostics-YYYYMMDD-HHMMSS-PID/ with verbose.log and minified.log
- ETW events decoded once via TDH, formatted independently for each mode
- On Ctrl+C: flushes logs, zips folder via PowerShell Compress-Archive, prints paths
- Second Ctrl+C forces immediate exit (escape hatch)
- Refactored ETW decoding to split TDH property extraction from mode-dependent formatting

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jsidewhite jsidewhite changed the title feat(diagnostic-console): add --collect flag for log capture mxc-diagnostic-console: add --collect flag for log capture May 14, 2026
@bbonaby bbonaby mentioned this pull request May 14, 2026
7 tasks
Copilot AI review requested due to automatic review settings May 14, 2026 20:11
@jsidewhite
jsidewhite merged commit a2c184c into main May 15, 2026
15 checks passed
@jsidewhite
jsidewhite deleted the jsidewhite/mxc_diagnostic_console_dashdash_collect branch May 15, 2026 17:53
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