Skip to content

Fix single-line formatting for custom Event Log output - #237

Open
bob sira (bobsira) wants to merge 1 commit into
mainfrom
fix/eventlog-custom-single-line
Open

bob sira (bobsira) wants to merge 1 commit into
mainfrom
fix/eventlog-custom-single-line

Conversation

@bobsira

@bobsira bob sira (bobsira) commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #200.

Custom Event Log output did not honor eventFormatMultiLine: false. Replace each CRLF, CR, or LF line break in the event message with one space before applying the custom format.

  • Preserve multiline output when the setting is true or omitted.
  • Leave JSON/XML output and other log sources unchanged.
  • Add two regression tests covering eight message shapes in both single-line and multiline modes, including mixed line endings, blank lines, literal escape sequences, and tabs.
  • Document custom single-line behavior.

Validation

  • Built LogMonitor and LogMonitorTests in x64 Release.
  • Before the fix, the single-line regression failed while the multiline regression passed.
  • After the fix, both regressions passed, and the related EventMonitor, configuration, and utility selection passed 12/12 tests

Honor eventFormatMultiLine=false by replacing CRLF, CR, and LF in custom event messages with spaces. Preserve multiline mode and other output formats, add regression coverage, and document the behavior.

Addresses #200.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The narrowly scoped fix matches the reported issue, includes targeted regression coverage, and has no identified blocking issues.

No open issues 🎉

What changed in this PR

Fixes #200 by making custom Event Log output honor eventFormatMultiLine: false, while preserving multiline behavior and leaving other output formats and log sources unchanged.

Changes:

  • Replace each CRLF, CR, or LF message line break with one space before custom formatting.
  • Add single-line and multiline regression tests covering eight message shapes.
  • Document custom output’s single-line behavior.
File Description
LogMonitor/​src/​LogMonitor/​EventMonitor.cpp Normalize message line breaks for custom single-line output.
LogMonitor/​LogMonitorTests/​EventMonitorTests.cpp Cover line endings, blank lines, literal escapes, and tabs in both modes.
LogMonitor/​docs/​README.md Clarify newline replacement for custom output.

Review effort: Balanced

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.

[BUG] eventFormatMultiLine: false is not honored for logFormat: custom

2 participants