Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 1.9 KB

README.md

File metadata and controls

26 lines (21 loc) · 1.9 KB

Serilog.Sink.Cache

Caching Sink for Serilog This Sink forwards all LogEvents to its output sinks when there is an available network connection. When there is no connection to the internet, all LogEvents are stored in a local database and forwarded as soon as a network connection is detected.

NuGet Badge Build Status CodeFactor Code Smells Maintainability Rating Security Rating Coverage Dependabot Status

Usage

Log.Logger = new LoggerConfiguration()
    .WithCache("connectionString")
        .AddSink(new ConsoleSink(...)          // cache when offline
        .BuildCaching()
    .WriteTo().Console()    // always log here
    .CreateLogger();