Soenneker.Extensions.LoggerConfiguration.Hangfire 4.0.1400

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Extensions.LoggerConfiguration.Hangfire --version 4.0.1400
                    
NuGet\Install-Package Soenneker.Extensions.LoggerConfiguration.Hangfire -Version 4.0.1400
                    
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="Soenneker.Extensions.LoggerConfiguration.Hangfire" Version="4.0.1400" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.LoggerConfiguration.Hangfire" Version="4.0.1400" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.LoggerConfiguration.Hangfire" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Extensions.LoggerConfiguration.Hangfire --version 4.0.1400
                    
#r "nuget: Soenneker.Extensions.LoggerConfiguration.Hangfire, 4.0.1400"
                    
#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.
#:package Soenneker.Extensions.LoggerConfiguration.Hangfire@4.0.1400
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Extensions.LoggerConfiguration.Hangfire&version=4.0.1400
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.LoggerConfiguration.Hangfire&version=4.0.1400
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.LoggerConfiguration.Hangfire

Serilog LoggerConfiguration extensions for adding Hangfire job context and log sinks from application configuration.

Installation

dotnet add package Soenneker.Extensions.LoggerConfiguration.Hangfire

Usage

using Soenneker.Extensions.LoggerConfiguration.Hangfire;

builder.Host.UseSerilog((context, services, loggerConfiguration) =>
{
    loggerConfiguration.AddHangfire(context.Configuration);
});

Enable the integration and choose its minimum level through configuration:

{
  "Hangfire": {
    "Enabled": true
  },
  "Log": {
    "Levels": {
      "Default": "Information"
    }
  }
}

When Hangfire:Enabled is absent or false, AddHangfire() leaves the logger configuration unchanged. When enabled, it adds the Hangfire context enricher and an asynchronous Hangfire sink.

The sink's minimum level is read from Log:Levels:Default, then the legacy Log:DefaultLogLevel, then Information. The value is captured when the sink is added; later configuration changes do not update it automatically. Unsupported level names throw InvalidOperationException during setup.

This extension only connects Serilog to Hangfire console context. It does not configure Hangfire storage, start a worker server, expose or secure the dashboard, register jobs, or enable Hangfire.Console itself. Complete those steps in the host before expecting job-scoped output.

Call AddHangfire() once per LoggerConfiguration; repeated calls add duplicate enrichers/sinks and can duplicate output. The default Serilog async wrapper can drop events when its buffer is full rather than block job execution.

Job output can be visible to dashboard users. Avoid logging arguments, credentials, tokens, or personal data unless dashboard access and retention are appropriate for that information.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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
4.0.1410 0 9/16/2026
4.0.1409 0 9/16/2026
4.0.1408 3 9/15/2026
4.0.1407 65 9/15/2026
4.0.1405 76 9/13/2026
4.0.1404 84 9/13/2026
4.0.1403 86 9/12/2026
4.0.1402 82 9/12/2026
4.0.1401 77 9/12/2026
4.0.1400 90 9/12/2026
4.0.1399 88 9/9/2026
4.0.1398 95 9/9/2026
4.0.1397 97 9/8/2026
4.0.1396 103 9/8/2026
4.0.1395 93 9/8/2026
4.0.1394 103 9/7/2026
4.0.1393 111 9/5/2026
4.0.1392 91 9/4/2026
4.0.1391 101 9/4/2026
4.0.1390 94 9/4/2026
Loading failed

Use NuGet trusted publishing in publishing workflows