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.
#r "nuget: Observito.Trace.EventSourceFlightRecorder, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Observito.Trace.EventSourceFlightRecorder as a Cake Addin
#addin nuget:?package=Observito.Trace.EventSourceFlightRecorder&version=1.0.0

// Install Observito.Trace.EventSourceFlightRecorder as a Cake Tool
#tool nuget:?package=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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 224 9/18/2019