Teqit.Extensions.Seq
1.0.2
See the version list below for details.
dotnet add package Teqit.Extensions.Seq --version 1.0.2
NuGet\Install-Package Teqit.Extensions.Seq -Version 1.0.2
<PackageReference Include="Teqit.Extensions.Seq" Version="1.0.2" />
paket add Teqit.Extensions.Seq --version 1.0.2
#r "nuget: Teqit.Extensions.Seq, 1.0.2"
// Install Teqit.Extensions.Seq as a Cake Addin #addin nuget:?package=Teqit.Extensions.Seq&version=1.0.2 // Install Teqit.Extensions.Seq as a Cake Tool #tool nuget:?package=Teqit.Extensions.Seq&version=1.0.2
Microsoft Dependency Injection extensions for SEQ
Use this package during your start-up to write logging to SEQ.
It comes with a lot of enrichments by default:
- environment name,
- environment username,
- machine name,
- process Id,
- process name,
- thread Id,
- thread name.
By running the bare minimum of this package the log events will be send as verbose
to http://localhost:5341
without api key.
Changelog
1.0.2 Add apikey support and add summary for extension method
1.0.1 Add readme
1.0.0 Initial setup
Example
The default extension method acccepts nullable parameters, and thus can be used without any parameters.
using Teqit.Extensions.Seq;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSeq();
If you have SEQ running on a specific URL and port, then specify it like so:
using Teqit.Extensions.Seq;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSeq("https://company.io:5341/");
If you want to log only errors, then specify it like so:
using Serilog;
using Teqit.Extensions.Seq;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSeq(level: Serilog.Events.LogEventLevel.Error);
If you want to use an API key, then specify it like so:
using Teqit.Extensions.Seq;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSeq(apiKey: "01234567890123456789");
Add the following to your built WebApplication
object if you want request logging to appear in SEQ (this required the Serilog.AspNetCore package to be installed):
using Teqit.Extensions.Seq;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSeq();
var app = builder.Build();
app.UseSerilogRequestLogging();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1)
- Serilog.AspNetCore (>= 8.0.1)
- Serilog.Enrichers.Environment (>= 3.0.1)
- Serilog.Enrichers.Process (>= 3.0.0)
- Serilog.Enrichers.Thread (>= 4.0.0)
- Serilog.Sinks.Seq (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Add apikey support and add summary for extension method