GitXplorerGitXplorer
a

Serilog.Sinks.FingersCrossed

public
4 stars
0 forks
5 issues

Commits

List of commits on branch main.
Verified
84966d3685a823f03768b3204cfd36e56220e6c7

fix(ci): publish

aalexeyshockov committed 2 years ago
Verified
e70c6af4ce2d034288c263f14bec50f0e325296f

fix(ci): tests

aalexeyshockov committed 2 years ago
Verified
c3ec5659aa4a93effa432e870dbddf14f3f59701

chore(ci): .NET 7, overall polishing

aalexeyshockov committed 2 years ago
Unverified
33f76b9e0ed94c00dd31eebd390a38a7513b360f

chore: prepare new release

aalexeyshockov committed 3 years ago
Verified
acc5ee9ff3fdf758816bb6aea1d2b47c2cacac17

Public buffer flushing (#3)

aalexeyshockov committed 3 years ago
Unverified
742cfd2c48ca4c882f97ebe9014ffb34757570f1

chore: use full version for SonarCloud

aalexeyshockov committed 3 years ago

README

The README file for this repository.

Serilog.Sinks.FingersCrossed NuGet Serilog.Sinks.FingersCrossed

Buffered sink wrapper for Serilog.

Getting started

Install from NuGet:

dotnet CLI:

dotnet add package Serilog.Sinks.FingersCrossed

PowerShell:

Install-Package Serilog.Sinks.FingersCrossed

Assuming you have already installed the target sink, such as the file sink, move the wrapped sink's configuration within a WriteTo.FingersCrossed() statement:

Log.Logger = new LoggerConfiguration()
    .WriteTo.FingersCrossed(a => a.Console())
    // Other logger configuration
    .CreateLogger()

using (LogBuffer.BeginScope())
    Log.Information("This will be dropped");

using (LogBuffer.BeginScope())
{
    Log.Information("This will be written to the console");
    Log.Error("Because there is an error in the scope");
}

Log.CloseAndFlush();

About this sink

The sink was heavily inspired by PHP's Monolog fingers_crossed handler.