Skip to content

Event Viewer logs are not machine-readable: Event ID is always 0 and payload is localized #198

Description

@WeberRess

What problem are you trying to solve?

The app writes JSON to the Event Log, but the payload can't be consumed by any
log collector:

  1. Every event has Event ID 0. Logger.cs uses EventLogTraceListener, and
    Trace.TraceInformation passes id 0. There's no way to filter a successful
    optimization from a failure without parsing the message body.

  2. The payload is localized. On a pt-BR machine the same event logs
    "reason": "manual", "name": "lista de espera", "duration": "1,2 segundos".
    The values change per machine language, and the decimal comma makes
    duration unusable as a number.

  3. Helper.Serialize defaults to minified: false, so events are multi-line.

What is your suggested solution?

  • Assign stable Event IDs per operation type (e.g. 1101 optimization OK,
    1102 optimization failed), treated as append-only so they never change.
  • Keep localized strings in the UI and tray notification, use invariant
    values in the log body: Enum.GetName for reason and area, and an integer
    duration_ms instead of a formatted string.
  • Call Helper.Serialize(log, true).

No UI change, no new dependency, stays within .NET 4.0.

I have this working against 3.0.8 and can open a PR if you want it.
CONTRIBUTING.md says to branch from develop, but I only see main on the
remote. Which should I use?

Checklist

  • I have searched the existing issues to make sure this feature has not been requested yet.
  • I have updated the application to its latest version.
  • This issue is focused on a single feature or enhancement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA new feature, request, or performance improvement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions