feat(diagnostics): ITraceSink seam + TraceEvent + Null/Text sinks
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
11
engine/Age.Engine/Diagnostics/NullTraceSink.cs
Normal file
11
engine/Age.Engine/Diagnostics/NullTraceSink.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Age.Engine.Diagnostics;
|
||||
|
||||
/// <summary>The inert default: no step tracing, empty Emit. Supplying this (or null) to the VM
|
||||
/// guarantees byte-identical behavior.</summary>
|
||||
public sealed class NullTraceSink : ITraceSink
|
||||
{
|
||||
public static readonly NullTraceSink Instance = new();
|
||||
private NullTraceSink() { }
|
||||
public bool TracingSteps => false;
|
||||
public void Emit(in TraceEvent e) { }
|
||||
}
|
||||
Reference in New Issue
Block a user