Jakar.Logging
10.3.0
dotnet add package Jakar.Logging --version 10.3.0
NuGet\Install-Package Jakar.Logging -Version 10.3.0
<PackageReference Include="Jakar.Logging" Version="10.3.0" />
<PackageVersion Include="Jakar.Logging" Version="10.3.0" />
<PackageReference Include="Jakar.Logging" />
paket add Jakar.Logging --version 10.3.0
#r "nuget: Jakar.Logging, 10.3.0"
#:package Jakar.Logging@10.3.0
#addin nuget:?package=Jakar.Logging&version=10.3.0
#tool nuget:?package=Jakar.Logging&version=10.3.0
Jakar.Logging
Serilog and Microsoft.Extensions.Logging support for the Jakar packages: app logger options, OpenTelemetry activity enrichment, telemetry sources and spans, app/device/GC/thread properties, AppVersion and diagnostics.
dotnet add package Jakar.Logging
Split out of Jakar.Extensions in 10.12.0. It depends on Jakar.Core (and through it Jakar.Json) and Serilog; Jakar.Extensions 10.13 depends on it and type-forwards the types that moved here. The types are in the Jakar.Extensions namespace.
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;CreateLogger(TelemetrySource, DeviceInformation?)adds the app and device properties.ActivityEnricher: the currentActivity(trace, span, parent, tags, baggage, events), plus thread and GC state on warnings and above.OpenTelemetryActivityEnricheradds the app/device properties of aTelemetrySourceon top (TelemetrySourceEnricher).TelemetrySource,TelemetrySpan,AppVersion,AppInformation,DeviceInformation,GcInfo,StopWatch,SelfLogger,ExceptionDetails.LogEventProperties:GetProperty()/ToProperty()forAppInformation,GcInfoandDeviceInformation;DeviceInformationEnricher(device.ToEnricher()).RuntimeProperties:Thread()/Gc()read from the runtime;Enricher: Serilog property helpers;ScreenShot;ScopeProvider,NullScope.
Migrating
- From 10.2.0: Jakar.Logging.Serilog is retired; its types are here, so drop that package.
ThreadInformation.GetProperty()is gone: useRuntimeProperties.Thread(). Use Jakar.Extensions 10.13.0 or later. - From 10.1.0:
AppLoggerOptionsis no longer aBaseClassor disposable and has noDeviceInfo(pass the device toCreateLogger(source, device));PathsbecameLogsDirectory,LogsFileandScreenshotFile;IOpenTelemetryActivityEnricheris gone;ScreenShot.Fileis a path.
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. |
.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 | Versions 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. |
-
net10.0
- Jakar.Core (>= 10.1.0)
- JetBrains.Annotations (>= 2026.2.0)
- Microsoft.Extensions.Logging.Abstractions (>= 11.0.0)
- Microsoft.Extensions.Options (>= 11.0.0)
- Serilog (>= 4.4.0)
- Serilog.Formatting.Compact (>= 3.0.0)
- Serilog.Sinks.Async (>= 2.1.0)
- Serilog.Sinks.Console (>= 6.1.1)
- Serilog.Sinks.Debug (>= 3.0.0)
- Serilog.Sinks.File (>= 7.0.0)
- System.IO.Hashing (>= 11.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Jakar.Logging:
| Package | Downloads |
|---|---|
|
Jakar.Logging.Serilog
Jakar.Extensions integration for Jakar.Logging: Serilog properties for AppInformation, ThreadInformation, GcInfo and DeviceInformation, and app/device enrichment from a TelemetrySource. |
GitHub repositories
This package is not used by any popular GitHub repositories.
10.3.0: depends on Jakar.Core. Gains TelemetrySource, TelemetrySpan, AppVersion (+ flags), AppInformation, DeviceInformation (+ category/platform/types), GcInfo/GcMemoryInformation/GcGenerationInformation, StopWatch, SelfLogger, FuzzyEqualizer, ExceptionDetails/MethodDetails/ParameterDetails (from Jakar.Extensions, which type-forwards them), and everything that was in Jakar.Logging.Serilog: LogEventProperties, DeviceInformationEnricher, TelemetrySourceEnricher, OpenTelemetryActivityEnricher, AppLoggerOptions.CreateLogger(TelemetrySource)/Info. ThreadInformation stays in Jakar.Extensions; its Serilog property is RuntimeProperties.Thread(). Use with Jakar.Extensions 10.13.0 or later. 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.