![]() |
VOOZH | about |
dotnet add package UKHO.Logging.Serilog --version 2.26036.3
NuGet\Install-Package UKHO.Logging.Serilog -Version 2.26036.3
<PackageReference Include="UKHO.Logging.Serilog" Version="2.26036.3" />
<PackageVersion Include="UKHO.Logging.Serilog" Version="2.26036.3" />Directory.Packages.props
<PackageReference Include="UKHO.Logging.Serilog" />Project file
paket add UKHO.Logging.Serilog --version 2.26036.3
#r "nuget: UKHO.Logging.Serilog, 2.26036.3"
#:package UKHO.Logging.Serilog@2.26036.3
#addin nuget:?package=UKHO.Logging.Serilog&version=2.26036.3Install as a Cake Addin
#tool nuget:?package=UKHO.Logging.Serilog&version=2.26036.3Install as a Cake Tool
This UKHO.Logging.Serilog package targets .NET 8 and provides some UKHO specific Enricher classes for use with with Serilog to ensure that ASP .Net Core Web API projects within UKHO are logging details in a consistent manner.
builder.services.AddUkhoLoggingConfiguration();
builder.services.AddUkhoLogging();
or
builder.services.AddUkhoLogging(config =>
{
config.Environment = "Development";
config.ProjectName = "Global Kittens";
config.ServiceName = "Global Kitten Registration API";
});
The package can read configuration from 'appsettings.json' (or whatever source(s) your IConfiguration is configured to use):
{
"UkhoLogging": {
"Environment": "Development",
"ProjectName": "Global Kittens",
"ServiceName": "GLobal Kitten Registration API"
}
}
The section name "UkhoLogging" is required, as are the four properties:
The name of the runtime environment, one of "Development", "Testing", or "Production".
The name of the overarching project.
The name of the specific service.
The connection string for the Event Hub to which log events will be sent. This contains a secret, so it must not be checked into source control. However, since the property is tagged as 'Required', you will need to provide a dummy value in your appsettings.json file and then override it with your runtime source of IConfiguration.
The package pulls in and configures Serilog and adds a number of enrichers to the logging pipeline that add UKHO required properties to log events:
It also pulls in the Serilog Azure Event Hub sink and configures it using the EventHubConnectionString config
property. This will ship your log events to the Event Hub, formatted using the Elastic Common Schema (ECS) so
that they can be ingested by the UKHO ElasticCloud instance.
The UK Hydrographic Office (UKHO) supplies hydrographic information to protect lives at sea. Maintaining the confidentiality, integrity and availability of our services is paramount. Found a security bug? Please report it to us at UKHO-ITSO@gov.co.uk
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.26036.3 | 126 | 2/5/2026 |
| 2.26036.2 | 117 | 2/5/2026 |
| 2.26035.1 | 119 | 2/4/2026 |
| 2.25300.12 | 210 | 10/27/2025 |
| 2.0.0-alpha | 113 | 2/5/2026 |
| 1.25247.1 | 2,488 | 9/9/2025 |
| 1.24267.3 | 13,563 | 9/23/2024 |
| 1.24262.4 | 171 | 9/18/2024 |
| 1.24261.10 | 173 | 9/17/2024 |
| 1.24261.8 | 191 | 9/17/2024 |