Observito.Trace.EventSourceFlightRecorder 1.0.0

Continuous recording of in-process event sources. Useful for logging last events before an exception, e.g. unhandled top level exceptions.

Install-Package Observito.Trace.EventSourceFlightRecorder -Version 1.0.0
dotnet add package Observito.Trace.EventSourceFlightRecorder --version 1.0.0
<PackageReference Include="Observito.Trace.EventSourceFlightRecorder" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Observito.Trace.EventSourceFlightRecorder --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

EventSourceFlightRecorder

Continuous recording of in-process event sources. Useful for logging last events before an exception, e.g. unhandled top level exceptions.

Sample

using var recorder = new EventSourceFlightRecorder<string>(100);

recorder.EnableEvents(EchoEventSource.Log, EventLevel.Informational, ev => $"[{ev.TimeStamp:yyyy-MM-dd HH:mm:ss.ffff}] {ev.EventSource.Name}/{ev.EventName}/{ev.Opcode}: { EventFormatting.FormatMessage(ev)}");

// ... later ...

foreach (var ev in recorder.Snapshot)
    Console.WriteLine($"- {ev}");

EventSourceFlightRecorder

Continuous recording of in-process event sources. Useful for logging last events before an exception, e.g. unhandled top level exceptions.

Sample

using var recorder = new EventSourceFlightRecorder<string>(100);

recorder.EnableEvents(EchoEventSource.Log, EventLevel.Informational, ev => $"[{ev.TimeStamp:yyyy-MM-dd HH:mm:ss.ffff}] {ev.EventSource.Name}/{ev.EventName}/{ev.Opcode}: { EventFormatting.FormatMessage(ev)}");

// ... later ...

foreach (var ev in recorder.Snapshot)
    Console.WriteLine($"- {ev}");

Release Notes

Initial release.

  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 51 9/18/2019