https://github.com/soenneker/soenneker.serilog.sinks.tunit
A Serilog sink for logging within TUnit
https://github.com/soenneker/soenneker.serilog.sinks.tunit
csharp dotnet serilog sink sinks testing tests tunit tunittestcontextsink util
Last synced: about 3 hours ago
JSON representation
A Serilog sink for logging within TUnit
- Host: GitHub
- URL: https://github.com/soenneker/soenneker.serilog.sinks.tunit
- Owner: soenneker
- License: mit
- Created: 2026-04-20T13:56:05.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-06-13T00:43:10.000Z (2 days ago)
- Last Synced: 2026-06-13T02:22:47.386Z (2 days ago)
- Topics: csharp, dotnet, serilog, sink, sinks, testing, tests, tunit, tunittestcontextsink, util
- Language: C#
- Homepage: https://soenneker.com
- Size: 90.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
[](https://www.nuget.org/packages/soenneker.serilog.sinks.tunit/)
[](https://github.com/soenneker/soenneker.serilog.sinks.tunit/actions/workflows/publish-package.yml)
[](https://www.nuget.org/packages/soenneker.serilog.sinks.tunit/)
#  Soenneker.Serilog.Sinks.TUnit
### A Serilog sink for logging within TUnit
## Installation
```
dotnet add package Soenneker.Serilog.Sinks.TUnit
```
## Usage
Default usage enables live in-progress updates with a built-in `250ms` throttle:
```csharp
using var logger = new LoggerConfiguration()
.WriteTo.Sink(new TUnitTestContextSink())
.CreateLogger();
```
If you want to customize the live update behavior, pass options explicitly:
```csharp
using var logger = new LoggerConfiguration()
.WriteTo.Sink(new TUnitTestContextSink(new TUnitTestContextSinkOptions
{
EnableImmediateUpdates = true,
ImmediateUpdateThrottle = TimeSpan.FromMilliseconds(250)
}))
.CreateLogger();
```