public sealed class EventSourceSinkThe log as an EventSource, so that dotnet-trace, PerfView, ETW and LTTng can record it alongside the runtime's own events.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
What this buys that the other sinks do not: one timeline. A GC pause, a JIT event, a thread-pool starvation warning and the engine's "device lost" line collected by the same tool, ordered against each other by the same clock. Correlating a log file with a separate trace by wall-clock timestamps is a job nobody does twice.
dotnet-trace collect --providers Vixen-Diagnostics-Log, and the level passed to the collector filters at the source — a provider enabled at Warning never formats the informational lines, which is the difference between tracing a running game and changing what it measures.
One event per level rather than one event with a level argument, because that is what makes the collector's own verbosity filter work: EventLevel is a property of the event, not of its payload.
Ahead-of-time builds may have EventSourceSupport switched off, in which case the writes compile to nothing and this sink costs its filter check. That is the intended behaviour for a shipping build, and the reason the sink checks IsEnabled rather than assuming anybody is listening.
Fields and properties (1)
public const string ProviderNameThe provider name to give dotnet-trace or PerfView.
Methods (2)
Used by (2)
- CapturingEventListenerVixen.Core.Diagnostics.Tests
- SinkTestsVixen.Core.Diagnostics.Tests