项目作者: digitalrmdy

项目描述 :
Caching sink for serilog
高级语言: C#
项目地址: git://github.com/digitalrmdy/Serilog.Sink.Caching.git
创建时间: 2020-02-20T11:05:28Z
项目社区:https://github.com/digitalrmdy/Serilog.Sink.Caching

开源协议:MIT License

下载


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

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