EMH.Lib.Patterns.HippoLog.SerilogAdapter
3.1.202
dotnet add package EMH.Lib.Patterns.HippoLog.SerilogAdapter --version 3.1.202
NuGet\Install-Package EMH.Lib.Patterns.HippoLog.SerilogAdapter -Version 3.1.202
<PackageReference Include="EMH.Lib.Patterns.HippoLog.SerilogAdapter" Version="3.1.202" />
<PackageVersion Include="EMH.Lib.Patterns.HippoLog.SerilogAdapter" Version="3.1.202" />
<PackageReference Include="EMH.Lib.Patterns.HippoLog.SerilogAdapter" />
paket add EMH.Lib.Patterns.HippoLog.SerilogAdapter --version 3.1.202
#r "nuget: EMH.Lib.Patterns.HippoLog.SerilogAdapter, 3.1.202"
#:package EMH.Lib.Patterns.HippoLog.SerilogAdapter@3.1.202
#addin nuget:?package=EMH.Lib.Patterns.HippoLog.SerilogAdapter&version=3.1.202
#tool nuget:?package=EMH.Lib.Patterns.HippoLog.SerilogAdapter&version=3.1.202
๐ HippoLog ยท Serilog Adapter
A HippoLog
ILogAdapterthat sends every HippoLog call to Serilog's staticLoglogger.
โจ What it does
HippoLog Core defines a logging interface, ILogAdapter. This package implements it with Serilog. Create it at the host level, then hand it to HippoLog.
flowchart LR
APP["Your code"]
HL["HippoLog<br/>(HippoLog Core)"]
AD["SerilogAdapter"]
LOG["Serilog static Log.Logger"]
SINKS["Your Serilog sinks"]
APP --> HL --> AD --> LOG --> SINKS
| Type | Purpose |
|---|---|
SerilogAdapterFactory.Create() |
Returns the adapter. It is a lazy singleton, so every call returns the same instance. |
Logic.SerilogAdapter |
Maps LogVerbose, LogDebug, LogInformation, LogWarning, LogError and LogFatal (with or without an exception, with 0โ3 typed values or a params array) to the matching Log.* call. |
The adapter writes to Serilog's global Log.Logger. It does no configuration of its own. Set up Log.Logger first, or nothing gets written.
๐ฆ Using this package
Package ID: EMH.Lib.Patterns.HippoLog.SerilogAdapter. It is published to the private Email Hippo NuGet feed.
Install-Package EMH.Lib.Patterns.HippoLog.SerilogAdapter
Set up Serilog as normal:
Log.Logger = new LoggerConfiguration()
.Enrich.FromLogContext()
.WriteTo.Console()
.MinimumLevel.Debug()
.CreateLogger();
Then set up HippoLog with the Serilog adapter:
ILogAdapter serilogAdapter = SerilogAdapterFactory.Create();
HippoLog.Initialize(serilogAdapter);
HippoLog.LogVerbose("I work!");
Messages are Serilog message templates. See the Serilog docs for the format.
๐ Quick start
Prerequisites
- .NET 10 SDK (CI uses
mcr.microsoft.com/dotnet/sdk:10.0) - Access to the private Email Hippo NuGet feed, for
EMH.Lib.Patterns.HippoLog.Core
Build and test
cd src
dotnet build
dotnet test
๐งช Testing
| Suite | Location | Framework | Needs |
|---|---|---|---|
| Unit | src/Tests/EMH.Lib.Patterns.HippoLog.SerilogAdapter.Tests |
NUnit + FluentAssertions, net10.0 | Nothing |
Tests capture log events with Serilog.Sinks.TestCorrelator. There is one test so far: DebugTests checks that LogDebug writes one Debug event with the right template.
๐๏ธ Project layout
src/
โโโ Component/EMH.Lib.Patterns.HippoLog.Serilog/ The package (netstandard2.0)
โ โโโ SerilogAdapterFactory.cs Public entry point
โ โโโ Logic/SerilogAdapter.cs ILogAdapter โ Serilog Log.*
โโโ Tests/EMH.Lib.Patterns.HippoLog.SerilogAdapter.Tests/ NUnit tests (net10.0)
โโโ EMH.Lib.Patterns.HippoLog.SerilogAdapter.sln
bitbucket-pipelines.yml
Note that the project folder is EMH.Lib.Patterns.HippoLog.Serilog but the project file and package are ...SerilogAdapter.
๐ CI/CD
Bitbucket Pipelines (bitbucket-pipelines.yml), on the mcr.microsoft.com/dotnet/sdk:10.0 image:
- Other branches. Restore, Release build, Release tests.
master. The same, thendotnet packanddotnet nuget pushto the feed inGLOBAL_NUGET_FEED_URL, using the key inGLOBAL_NUGET_KEY_EMAILHIPPO_LTD.
The package version is ${BUILD_VERSION_PREFIX}.${BITBUCKET_BUILD_NUMBER}, set in the pipeline. Every green master build publishes a new version.
๐ See also
<sub>ยฉ Email Hippo Ltd</sub>
| 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 was computed. 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 was computed. 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
- EMH.Lib.Patterns.HippoLog.Core (>= 1.0.6)
- Serilog (>= 4.4.0)
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 |
|---|---|---|
| 3.1.202 | 0 | 11/28/2026 |
| 3.1.200 | 1,129 | 11/20/2026 |
| 3.1.196 | 4,049 | 10/14/2026 |
| 3.1.195 | 429 | 10/10/2026 |
| 3.1.194 | 1,213 | 9/28/2026 |
| 3.1.193 | 1,368 | 9/16/2026 |
| 3.1.192 | 204 | 9/15/2026 |
| 3.1.191 | 490 | 9/10/2026 |
| 3.1.190 | 814 | 8/28/2026 |
| 3.1.189 | 611 | 8/25/2026 |
| 3.1.188 | 1,519 | 8/15/2026 |
| 1.1.187 | 2,228 | 7/15/2026 |
| 1.1.186 | 604 | 7/11/2026 |
| 1.1.185 | 876 | 6/24/2026 |
| 1.1.184 | 2,217 | 5/27/2026 |
| 1.1.183 | 639 | 5/20/2026 |
| 1.1.182 | 684 | 5/13/2026 |
| 1.1.181 | 760 | 5/4/2026 |
| 1.1.180 | 438 | 4/29/2026 |
| 1.1.179 | 1,923 | 4/8/2026 |
Updated packages.