Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/digitalrmdy/serilog.sink.caching
Caching sink for serilog
https://github.com/digitalrmdy/serilog.sink.caching
caching csharp nuget-package serilog sinks xamarin
Last synced: about 1 month ago
JSON representation
Caching sink for serilog
- Host: GitHub
- URL: https://github.com/digitalrmdy/serilog.sink.caching
- Owner: digitalrmdy
- License: mit
- Created: 2020-02-20T11:05:28.000Z (almost 5 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-08T09:47:04.000Z (about 2 years ago)
- Last Synced: 2024-11-06T21:19:22.859Z (about 2 months ago)
- Topics: caching, csharp, nuget-package, serilog, sinks, xamarin
- Language: C#
- Size: 235 KB
- Stars: 1
- Watchers: 9
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://buildstats.info/nuget/serilog.sink.cache)](https://www.nuget.org/packages/Serilog.Sink.Cache/)
[![Build Status](https://app.bitrise.io/app/b8ab60d5eddce15a/status.svg?token=kBuN-dQKUhDpaOp0ntsBSw&branch=master)](https://app.bitrise.io/app/b8ab60d5eddce15a)
[![CodeFactor](https://www.codefactor.io/repository/github/digitalrmdy/serilog.sink.caching/badge)](https://www.codefactor.io/repository/github/digitalrmdy/serilog.sink.caching)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=digitalrmdy_Serilog.Sink.Caching&metric=code_smells)](https://sonarcloud.io/dashboard?id=digitalrmdy_Serilog.Sink.Caching)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=digitalrmdy_Serilog.Sink.Caching&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=digitalrmdy_Serilog.Sink.Caching)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=digitalrmdy_Serilog.Sink.Caching&metric=security_rating)](https://sonarcloud.io/dashboard?id=digitalrmdy_Serilog.Sink.Caching)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=digitalrmdy_Serilog.Sink.Caching&metric=coverage)](https://sonarcloud.io/dashboard?id=digitalrmdy_Serilog.Sink.Caching)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=digitalrmdy/Serilog.Sink.Caching)](https://dependabot.com)## Usage
```
Log.Logger = new LoggerConfiguration()
.WithCache("connectionString")
.AddSink(new ConsoleSink(...) // cache when offline
.BuildCaching()
.WriteTo().Console() // always log here
.CreateLogger();
```