Jakar.Logging 10.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Jakar.Logging --version 10.2.0
                    
NuGet\Install-Package Jakar.Logging -Version 10.2.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="Jakar.Logging" Version="10.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jakar.Logging" Version="10.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Jakar.Logging" />
                    
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 Jakar.Logging --version 10.2.0
                    
#r "nuget: Jakar.Logging, 10.2.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.
#:package Jakar.Logging@10.2.0
                    
#: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=Jakar.Logging&version=10.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Jakar.Logging&version=10.2.0
                    
Install as a Cake Tool

Jakar.Logging

Serilog and Microsoft.Extensions.Logging support: app logger options, OpenTelemetry activity enrichment, thread and GC properties, screenshots and scopes.

dotnet add package Jakar.Logging

Split out of Jakar.Extensions in 10.12.0. Since 10.2.0 it doesn't depend on Jakar.Extensions or Jakar.Files: only Serilog (and its sinks), Microsoft.Extensions.Logging.Abstractions/Options and System.IO.Hashing. The types are in the Jakar.Extensions namespace. For the Jakar.Extensions integration (AppInformation, DeviceInformation, TelemetrySource), add Jakar.Logging.Serilog.

What's in it

  • AppLoggerOptions: Serilog configuration for an app: debug and rolling-file sinks, Enrichers, and the folders (AppDataDirectory, CacheDirectory, LogsDirectory, SeqBuffer) and files (LogsFile, ScreenshotFile) as paths. CreateLogger(configure) builds the logger.
  • ActivityEnricher: adds the current Activity (trace, span, parent, tags, baggage, events), plus the thread and GC state on warnings and above.
  • RuntimeProperties: Thread() / Gc() as Serilog properties (the same shape as Jakar.Extensions' ThreadInformation / GcInfo).
  • Enricher: Serilog property helpers and Activity span/trace/parent IDs.
  • ScreenShot: attaches a screenshot reference to log events.
  • ScopeProvider, NullScope: IExternalScopeProvider implementations.

Migrating from 10.1.0

  • Add Jakar.Logging.Serilog if you use LogEventProperties (AppInformation.GetProperty(), DeviceInformation.ToProperty(), ...), DeviceInformationEnricher, OpenTelemetryActivityEnricher or CreateLogger(TelemetrySource); they moved there.
  • AppLoggerOptions is no longer a BaseClass or disposable, and has no DeviceInfo (pass the device to Jakar.Logging.Serilog' CreateLogger(source, device)). Paths (a Jakar.Files FilePaths) became LogsDirectory, LogsFile and ScreenshotFile; the directories are strings. ConfigureLogger no longer takes a TelemetrySource.
  • IOpenTelemetryActivityEnricher is gone; ActivityEnricher takes the AppLoggerOptions.
  • ScreenShot.File is a path; Enricher lost its AppVersion / GcGenerationInformation overloads (they're on LogEventProperties in Jakar.Logging.Serilog).

Versioning

Versions are <.NET major>.<library major>.<library minor>: a breaking change bumps the middle number (10.1.0 → 10.2.0), anything else the last one.

Repository

Path What it is
Jakar.Logging/ The Jakar.Logging package (Serilog only).
Jakar.Logging.Tests/ NUnit tests.
Jakar.Logging.Serilog/ The Jakar.Logging.Serilog package: the Jakar.Extensions integration (see its README).
Jakar.Logging.Serilog.Tests/ NUnit tests.
.github/workflows/ci.yml Build and test on Ubuntu and Windows, for every push and pull request.
.github/workflows/publish.yml On master: CI, then pack both packages and push them to nuget.org (Trusted Publishing).
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 (7)

Showing the top 5 NuGet packages that depend on Jakar.Logging:

Package Downloads
Jakar.Extensions

Extensions to aid in development.

Jakar.Database

Package Description

Jakar.Files

Files, directories, file watchers, embedded resources, INI configuration and preference files for Jakar.Extensions.

Jakar.Users

User, group, role and address models (Guid- and long-keyed), login requests, claims, permissions and JWT parsing.

Jakar.Http

An HttpClient-based requester (WebRequester) with retries, typed JSON bodies on Jakar.Json, and WebResponse<T> results that carry their errors.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.3.0 0 11/18/2026
10.2.0 55 11/16/2026
10.1.0 55 11/16/2026

10.2.0: BREAKING: no longer depends on Jakar.Extensions or Jakar.Files (Serilog, Microsoft.Extensions.Logging.Abstractions/Options and System.IO.Hashing only). The Jakar.Extensions parts moved to the new Jakar.Logging.Serilog: LogEventProperties (AppInformation/ThreadInformation/GcInfo/DeviceInformation properties), DeviceInformationEnricher, OpenTelemetryActivityEnricher (app and device properties from a TelemetrySource) and AppLoggerOptions.CreateLogger(TelemetrySource). Here: ActivityEnricher (spans, plus thread and GC state from RuntimeProperties on warnings) replaces OpenTelemetryActivityEnricher; IOpenTelemetryActivityEnricher is gone. AppLoggerOptions is no longer a BaseClass or disposable, has no DeviceInfo/Info, uses string paths (AppDataDirectory, CacheDirectory, LogsDirectory, SeqBuffer, LogsFile, ScreenshotFile) instead of LocalDirectory/FilePaths, CreateLogger(Action<LoggerConfiguration>?) replaces CreateLogger(TelemetrySource), and ConfigureLogger no longer takes a TelemetrySource; the folder/template constants are on AppLoggerOptions. ScreenShot.File is a path. Enricher lost its AppVersion/GcGenerationInformation overloads. 10.1.0: initial release. Split out of Jakar.Extensions 10.12.0; the types keep the Jakar.Extensions namespace.