Teqit.Extensions.Seq 1.1.0

dotnet add package Teqit.Extensions.Seq --version 1.1.0                
NuGet\Install-Package Teqit.Extensions.Seq -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Teqit.Extensions.Seq" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Teqit.Extensions.Seq --version 1.1.0                
#r "nuget: Teqit.Extensions.Seq, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Teqit.Extensions.Seq as a Cake Addin
#addin nuget:?package=Teqit.Extensions.Seq&version=1.1.0

// Install Teqit.Extensions.Seq as a Cake Tool
#tool nuget:?package=Teqit.Extensions.Seq&version=1.1.0                

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 sent as verbose to http://localhost:5341 without api key.

Changelog

1.1.0 Add default docker URL support.

1.0.3 Update readme and summary and add project URL.

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:

using Serilog;
using Teqit.Extensions.Seq;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSeq();

var app = builder.Build();
app.UseSerilogRequestLogging();

If you have SEQ running as a Docker container and want to use the default host.docker.internal URL, then specify it like so:

using Teqit.Extensions.Seq;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSeq(useDefaultDockerContainerUrl: true);
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 254 8/4/2024
1.0.3 105 7/13/2024
1.0.2 113 7/7/2024
1.0.1 123 7/5/2024
1.0.0 116 7/5/2024

Add default docker URL support.