OpenUrzednik.Extensions.Logging
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package OpenUrzednik.Extensions.Logging --version 1.0.0
NuGet\Install-Package OpenUrzednik.Extensions.Logging -Version 1.0.0
<PackageReference Include="OpenUrzednik.Extensions.Logging" Version="1.0.0" />
<PackageVersion Include="OpenUrzednik.Extensions.Logging" Version="1.0.0" />
<PackageReference Include="OpenUrzednik.Extensions.Logging" />
paket add OpenUrzednik.Extensions.Logging --version 1.0.0
#r "nuget: OpenUrzednik.Extensions.Logging, 1.0.0"
#:package OpenUrzednik.Extensions.Logging@1.0.0
#addin nuget:?package=OpenUrzednik.Extensions.Logging&version=1.0.0
#tool nuget:?package=OpenUrzednik.Extensions.Logging&version=1.0.0
OpenUrzednik.Extensions.Logging
⚠️ Unofficial: OpenUrzednik.NET is a community project. It is not affiliated with, authorized or endorsed by Narodowy Bank Polski (NBP) or any other Polish public institution.
Adapter that sends the logs of OpenUrzednik.NET clients to ILogger from Microsoft.Extensions.Logging.
Part of OpenUrzednik.NET. See the main README for an overview of the project.
Installation
dotnet add package OpenUrzednik.Extensions.Logging
Usage
using OpenUrzednik.Extensions.Logging;
using OpenUrzednik.Nbp;
var client = new NbpGoldPriceClient(httpClient,
logger: loggerFactory.CreateOpenUrzednikLogger<NbpGoldPriceClient>());
The log category is the client's full type name (e.g. OpenUrzednik.Nbp.NbpGoldPriceClient), as with ILogger<T>. You can turn a whole provider's logs on or off by prefix:
{
"Logging": {
"LogLevel": {
"OpenUrzednik.Nbp": "Debug"
}
}
}
If you already have an ILogger, use new OpenUrzednikLogger(logger).
Every entry has an event id (EventId with an id and a name, e.g. 1001 RequestTimedOut), fixed by the library and the same in every client of a provider; NBP lists them in NbpLogEvents and the telemetry reference. Filter by event id rather than message text, which may change.
Entries are structured: they carry named values (e.g. provider, path) and the template in {OriginalFormat}, like entries from LoggerMessage. Serilog, OpenTelemetry and other providers see them as separate properties. The message text is formatted with the invariant culture.
Entries are written while the operation's span is Activity.Current, so with tracing on, your logging setup can attach the trace and span ids to them: OpenTelemetry logging does it by itself, plain Microsoft.Extensions.Logging with ActivityTrackingOptions. See Correlating logs and traces in the OpenUrzednik.Diagnostics README.
Trimming and Native AOT
The .NET builds (net8.0, net10.0) are trimming- and Native AOT-compatible: publishing an app with trimming or Native AOT gives no warning from this package. CI checks it on every change (ADR-0014). The netstandard2.0 build (.NET Framework) isn't covered.
Dependencies
The package depends on Microsoft.Extensions.Logging.Abstractions. The core and provider packages have their own logging interfaces and don't need this dependency (ADR-0003).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- OpenUrzednik.Core (>= 1.0.0)
-
net10.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- OpenUrzednik.Core (>= 1.0.0)
-
net8.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- OpenUrzednik.Core (>= 1.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on OpenUrzednik.Extensions.Logging:
| Package | Downloads |
|---|---|
|
OpenUrzednik.Nbp.DependencyInjection
Unofficial Microsoft.Extensions.DependencyInjection registration for the OpenUrzednik.NET NBP clients: typed HttpClients, validated options, logging, tracing and metrics; ready for AddStandardResilienceHandler() on .NET 8 and later. |
|
|
OpenUrzednik.MF.WhiteList.DependencyInjection
Unofficial Microsoft.Extensions.DependencyInjection registration for the OpenUrzednik.NET MF White List clients: typed HttpClients, validated options, logging, tracing and metrics, and logs without identifiers; ready for AddStandardResilienceHandler() on .NET 8 and later. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0-preview.132.g70cc330195 | 58 | 11/22/2026 |
| 1.1.0-preview.130.g4fc9e790ea | 62 | 11/22/2026 |
| 1.1.0-preview.127.g5921d82c17 | 58 | 11/22/2026 |
| 1.1.0-preview.124.g7f8d26b828 | 64 | 11/22/2026 |
| 1.1.0-preview.121.gdc045d8e7a | 64 | 11/22/2026 |
| 1.1.0-preview.119.g97e13fdebd | 57 | 11/22/2026 |
| 1.1.0-preview.116.g1b1671583e | 56 | 11/22/2026 |
| 1.1.0-preview.114.g9f96ff8840 | 66 | 11/21/2026 |
| 1.1.0-preview.112.g0fbe786a11 | 56 | 11/21/2026 |
| 1.1.0-preview.110.g3ee79ea816 | 62 | 11/21/2026 |
| 1.1.0-preview.108.g0dedd69cb8 | 61 | 11/21/2026 |
| 1.1.0-preview.106.g55562a4ff1 | 62 | 11/21/2026 |
| 1.1.0-preview.104.g114d53fbb1 | 61 | 11/21/2026 |
| 1.1.0-preview.102.g7e6caa33d5 | 59 | 11/21/2026 |
| 1.1.0-preview.100.g8dda39bc1f | 60 | 11/20/2026 |
| 1.1.0-preview.97.g341353d6eb | 59 | 11/20/2026 |
| 1.1.0-preview.93.g281b9eefb4 | 57 | 11/20/2026 |
| 1.1.0-preview.91.g61717a1cd6 | 57 | 11/20/2026 |
| 1.1.0-preview.88.gd6a66135c5 | 61 | 11/20/2026 |
| 1.0.0 | 743 | 11/6/2026 |