Skip to content

[Correctness] EventLogService.cs — Bracket heuristic for Servy logs matches unrelated events #463

@Christophe-Rogiers

Description

@Christophe-Rogiers

Severity: Warning

File: src/Servy.Core/Services/EventLogService.cs, lines 93–95

Description:
When no source name filter is active, the filter uses message.IndexOf("[") >= 0 && message.IndexOf("]") >= 0 to detect "Servy service logs". This heuristic is too broad — any event log message containing square brackets (e.g., Windows Security events, .NET runtime events, PowerShell logs) will pass this filter and appear in the Servy UI.

Suggested fix:
Use a more specific pattern, such as checking for the Servy log format [yyyy-MM-dd HH:mm:ss] via regex, or require the source name to contain "Servy".

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions