Skip to content

Commit 705ed5a

Browse files
Steve Muchowclaude
andcommitted
refactor!: reparent 87 sinks to HeraldSinkBase; reference Herald.OSS
Herald.OSS just unified its sink contract (every routed sink must implement IKernelSink) and is the canonical upstream. Herald.Sinks now references Herald.OSS directly — the former Modules/Core route is retired — and every sink inherits from HeraldSinkBase to claim IKernelSink automatically. Step 2 — Directory.Build.props reference swap: - Monorepo branch was: ProjectReference to ../Core/Herald.Core.csproj (sibling Modules/Core inside the umbrella). - Monorepo branch is now: ProjectReference to ../../../Herald.OSS/Herald.OSS.csproj (sibling Herald.OSS clone at /e/dev/Herald.OSS/). - Standalone branch unchanged: PackageReference to Herald.OSS NuGet pinned via $(HeraldCoreVersion). - HeraldCoreVersion pin bumped from 1.0.0 to 0.1.0 to match the Herald.OSS upstream version. - SinkAutoRegistrationGenerator ProjectReference moved from Modules/Generators/MMP.Herald.Generators.csproj to ../../../Herald.OSS/generators/MMP.Herald.OSS.Generators.csproj for the same reason — single upstream artifact. Step 3 — sink reparent (mechanical sed pass across 87 sink class files): - `: ILogger, IBatchedLogSink, IDisposable` → `: HeraldSinkBase, IBatchedLogSink, IDisposable` - `: ILogger` → `: HeraldSinkBase` - `public void Log(LogEvent` → `public override void Log(LogEvent` - `using MMP.Herald.Sinks;` added after `using MMP.Herald;` Each sink now gets: - ILogger contract for free via HeraldSinkBase - IKernelSink contract for free via HeraldSinkBase - Default `Log(in LogEventBuffer)` that materialises through KernelBufferAdapter.MaterializeAndRender and forwards to the subclass's `Log(LogEvent)` override - Subclasses keep their existing heap-event implementation unchanged What this fixes: - Before: a pipeline with any Herald.Sinks sink failed kernel eligibility because no sink implemented IKernelSink. Pipeline dropped to chain path: 812 ns / 1,160 B per emit, paid even by kernel-native sinks in the same fan-out (30× tax). - After: every sink claims IKernelSink via the base; the kernel fast path activates regardless of sink mix. Sinks that need LogEvent.Message pay the per-sink boundary materialisation (~360 ns / ~760 B). Sinks that don't can override `Log(in LogEventBuffer)` to consume the buffer directly for true zero-allocation emit. Contract tests updated to assert the new reference shape: - DirectoryBuildProps_owns_the_Herald_OSS_reference and DirectoryBuildProps_has_both_monorepo_and_standalone_branches now check the sibling-clone Herald.OSS path instead of ../Core. - HeraldCoreVersion_matches_Core_csproj_Version now cross-checks against Herald.OSS.csproj's Version (at ../../../Herald.OSS/). Build: 0 warnings, 0 errors across net8/net9/net10. Tests: 257/257 suites pass (1,800+ individual tests across the 98 sinks + Contract + helper suites). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7cc5cb3 commit 705ed5a

89 files changed

Lines changed: 336 additions & 240 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Directory.Build.props

Lines changed: 56 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@
2222
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2323

2424
<!--
25-
Version of Herald.OSS (the published NuGet package for Herald.Core)
26-
that every sink in this repo depends on. Pinned here so a single
27-
edit moves the whole sink ecosystem to a new Core release. Standalone
28-
clones of Herald.Sinks (where Modules/Core/ isn't a sibling) restore
29-
Herald.OSS from nuget.org at this version; the umbrella-monorepo
30-
build uses the live ProjectReference instead and ignores the pin.
25+
Version of Herald.OSS that every sink in this repo depends on.
26+
Pinned here so a single edit moves the whole sink ecosystem to
27+
a new Herald.OSS release. Standalone clones of Herald.Sinks
28+
(where Herald.OSS isn't a sibling directory) restore Herald.OSS
29+
from nuget.org at this version; the umbrella-monorepo build uses
30+
a live ProjectReference to ../../../Herald.OSS/ instead and
31+
ignores the pin. Herald.OSS is the canonical upstream — the
32+
former Modules/Core route is retired.
3133
-->
32-
<HeraldCoreVersion>1.0.0</HeraldCoreVersion>
34+
<HeraldCoreVersion>0.1.0</HeraldCoreVersion>
3335
</PropertyGroup>
3436

3537
<!--
@@ -134,74 +136,81 @@
134136
ctor into LogSinkProviderRegistry.Default at assembly load.
135137
136138
Path is relative to this Directory.Build.props file:
137-
MSBuildThisFileDirectory = Modules/Herald.Sinks/
138-
+ .. = Modules/
139-
+ Generators/MMP.Herald.Generators.csproj
139+
MSBuildThisFileDirectory = /e/dev/Herald/Modules/Herald.Sinks/
140+
+ ..\..\.. = /e/dev/
141+
+ Herald.OSS/generators/MMP.Herald.OSS.Generators.csproj
140142
OutputItemType=Analyzer makes Roslyn load it as a generator;
141143
ReferenceOutputAssembly=false keeps the netstandard2.0
142-
generator dll out of the sink's runtime closure. -->
143-
<ItemGroup>
144-
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Generators\MMP.Herald.Generators.csproj">
144+
generator dll out of the sink's runtime closure. The generator
145+
lives in Herald.OSS so the entire sink ecosystem references a
146+
single upstream artifact. -->
147+
<ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\generators\MMP.Herald.OSS.Generators.csproj')">
148+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\generators\MMP.Herald.OSS.Generators.csproj">
145149
<OutputItemType>Analyzer</OutputItemType>
146150
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
147151
</ProjectReference>
148152
</ItemGroup>
149153

150154
<!--
151-
Herald.OSS dependency — every sink references the Herald.Core
155+
Herald.OSS dependency — every sink references the Herald.OSS
152156
library. Two resolution paths, picked automatically based on
153-
whether this clone sits inside the umbrella monorepo:
154-
155-
* Monorepo — Modules/Core/Herald.Core.csproj exists as a
156-
sibling. ProjectReference pulls the live source
157-
so a Core edit shows up immediately in every
158-
sink build. Private="false" + ExcludeAssets="runtime"
159-
keep Core out of the sink plugin's bin\, because
160-
Herald.Server / the host already loads Core and
161-
the plugin context resolves to that copy via
162-
AssemblyDependencyResolver.
163-
* Standalone — Modules/Core/ does not exist (e.g. a fresh
164-
`git clone https://github.com/mmpworks/Herald.Sinks`
165-
outside the umbrella). PackageReference to
166-
Herald.OSS on nuget.org pinned at the
167-
HeraldCoreVersion declared above.
168-
169-
Per-sink csprojs do NOT declare a Herald.Core reference of their
157+
whether the Herald.OSS repo is cloned as a sibling of the
158+
Herald monorepo:
159+
160+
* Sibling clone — /e/dev/Herald.OSS/Herald.OSS.csproj exists
161+
relative to this monorepo at ../../../Herald.OSS/.
162+
ProjectReference pulls the live source so a
163+
Herald.OSS edit shows up immediately in every
164+
sink build. Private="false" + ExcludeAssets="runtime"
165+
keep Herald.OSS out of the sink plugin's bin\,
166+
because Herald.Server / the host already loads
167+
Herald.OSS and the plugin context resolves to
168+
that copy via AssemblyDependencyResolver.
169+
* Standalone — Herald.OSS is not present as a sibling (e.g. a
170+
fresh `git clone https://github.com/mmpworks/Herald.Sinks`
171+
outside the umbrella). PackageReference to
172+
Herald.OSS on nuget.org pinned at the
173+
HeraldCoreVersion declared above.
174+
175+
The former route through Modules/Core is retired — Herald.OSS is
176+
the canonical upstream for the entire sink ecosystem.
177+
178+
Per-sink csprojs do NOT declare a Herald.OSS reference of their
170179
own — the right one comes from here. A sink that needs to override
171-
(e.g. a private-fork experiment pinning a custom Core branch)
172-
sets <HeraldSinkCustomCoreRef>true</HeraldSinkCustomCoreRef> in
173-
its csproj and supplies its own reference; both ItemGroups below
180+
(e.g. a private-fork experiment pinning a custom branch) sets
181+
<HeraldSinkCustomCoreRef>true</HeraldSinkCustomCoreRef> in its
182+
csproj and supplies its own reference; both ItemGroups below
174183
short-circuit on that flag.
175184
-->
176185
<!-- Sink-package branch: Private=false + ExcludeAssets=runtime is the
177186
plugin-packaging shape. The sink's .nupkg stays small, and at runtime
178-
Herald.Server / the host has Core loaded — the plugin's
179-
AssemblyLoadContext resolves Core to the host's copy. -->
180-
<ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\Core\Herald.Core.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true' AND '$(IsTestProject)' != 'true'">
181-
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Core\Herald.Core.csproj">
187+
Herald.Server / the host has Herald.OSS loaded — the plugin's
188+
AssemblyLoadContext resolves Herald.OSS to the host's copy. -->
189+
<ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\Herald.OSS.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true' AND '$(IsTestProject)' != 'true'">
190+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\Herald.OSS.csproj">
182191
<Private>false</Private>
183192
<ExcludeAssets>runtime</ExcludeAssets>
184193
</ProjectReference>
185194
</ItemGroup>
186195

187-
<!-- Test-project branch: standard reference. Core.dll flows into the
188-
test bin\ so xunit can load the assembly and discover tests. There
189-
is no plugin host loading Core for us in a test process. -->
190-
<ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\Core\Herald.Core.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true' AND '$(IsTestProject)' == 'true'">
191-
<ProjectReference Include="$(MSBuildThisFileDirectory)..\Core\Herald.Core.csproj" />
196+
<!-- Test-project branch: standard reference. Herald.OSS.dll flows into
197+
the test bin\ so xunit can load the assembly and discover tests.
198+
There is no plugin host loading Herald.OSS for us in a test process. -->
199+
<ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\Herald.OSS.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true' AND '$(IsTestProject)' == 'true'">
200+
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\Herald.OSS.csproj" />
192201
</ItemGroup>
193202

194-
<ItemGroup Condition="!Exists('$(MSBuildThisFileDirectory)..\Core\Herald.Core.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true'">
203+
<ItemGroup Condition="!Exists('$(MSBuildThisFileDirectory)..\..\..\Herald.OSS\Herald.OSS.csproj') AND '$(HeraldSinkCustomCoreRef)' != 'true'">
195204
<!--
196205
Standalone PackageReference: NO PrivateAssets / ExcludeAssets.
197206
A consumer doing `dotnet add package Herald.Sinks.Datadog` to a
198207
plain ASP.NET Core or worker app expects Herald.OSS.dll to flow
199208
into their bin\ alongside the sink — otherwise the first sink
200209
registration throws FileNotFoundException at runtime. The
201-
monorepo branch above sets Private="false" + ExcludeAssets="runtime"
210+
sibling-clone branch above sets Private="false" + ExcludeAssets="runtime"
202211
because plugins live inside an AssemblyLoadContext where the host
203-
already loaded Core; that's a plugin-packaging optimisation, not
204-
a NuGet-distribution policy.
212+
already loaded Herald.OSS; that's a plugin-packaging optimisation,
213+
not a NuGet-distribution policy.
205214
-->
206215
<PackageReference Include="Herald.OSS" />
207216
</ItemGroup>

src/Herald.Sinks.Aliyun/AliyunSlsLogSink.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using System.Text.Json;
1313
using System.Threading;
1414
using MMP.Herald;
15+
using MMP.Herald.Sinks;
1516
using MMP.Herald.Pipeline;
1617
using MMP.Herald.Services;
1718
using LogEvent = MMP.Herald.Events.LogEvent;
@@ -40,7 +41,7 @@ namespace Herald.Sinks.Aliyun;
4041
/// own auth handler on top.
4142
/// </para>
4243
/// </remarks>
43-
public sealed class AliyunSlsLogSink : ILogger, IBatchedLogSink, IDisposable
44+
public sealed class AliyunSlsLogSink : HeraldSinkBase, IBatchedLogSink, IDisposable
4445
{
4546
private readonly Uri _endpoint;
4647
private readonly string _accessKeyId;
@@ -77,7 +78,7 @@ public AliyunSlsLogSink(
7778
_httpClient = httpClient ?? new HttpClient { Timeout = TimeSpan.FromSeconds(30) };
7879
}
7980

80-
public void Log(LogEvent logEvent)
81+
public override void Log(LogEvent logEvent)
8182
{
8283
ArgumentNullException.ThrowIfNull(logEvent);
8384
LogBatch(new[] { logEvent });

src/Herald.Sinks.AmazonS3/AmazonS3LogSink.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Amazon.S3;
1313
using Amazon.S3.Model;
1414
using MMP.Herald;
15+
using MMP.Herald.Sinks;
1516
using MMP.Herald.Pipeline;
1617
using MMP.Herald.Services;
1718
// AWS SDK doesn't shadow Herald's LogEvent, but we alias for consistency.
@@ -37,7 +38,7 @@ namespace Herald.Sinks.AmazonS3;
3738
/// rely on an IAM role attached to the compute platform.
3839
/// </para>
3940
/// </remarks>
40-
public sealed class AmazonS3LogSink : ILogger, IBatchedLogSink, IDisposable
41+
public sealed class AmazonS3LogSink : HeraldSinkBase, IBatchedLogSink, IDisposable
4142
{
4243
private readonly IAmazonS3 _client;
4344
private readonly bool _ownsClient;
@@ -80,7 +81,7 @@ public AmazonS3LogSink(
8081
_keyPrefix = keyPrefix.TrimEnd('/');
8182
}
8283

83-
public void Log(LogEvent logEvent)
84+
public override void Log(LogEvent logEvent)
8485
{
8586
ArgumentNullException.ThrowIfNull(logEvent);
8687
LogBatch(new[] { logEvent });

src/Herald.Sinks.ApplicationInsightsHttp/ApplicationInsightsLogSink.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using System.Text.Json;
1111
using System.Threading;
1212
using MMP.Herald;
13+
using MMP.Herald.Sinks;
1314
using MMP.Herald.Events;
1415
using MMP.Herald.Pipeline;
1516
using MMP.Herald.Services;
@@ -43,7 +44,7 @@ namespace Herald.Sinks.ApplicationInsightsHttp;
4344
/// end-to-end batching; the sink itself does not buffer.
4445
/// </para>
4546
/// </remarks>
46-
public sealed class ApplicationInsightsLogSink : ILogger, IBatchedLogSink, IDisposable
47+
public sealed class ApplicationInsightsLogSink : HeraldSinkBase, IBatchedLogSink, IDisposable
4748
{
4849
private readonly ApplicationInsightsConnectionString _connection;
4950
private readonly string? _roleName;
@@ -61,7 +62,7 @@ public ApplicationInsightsLogSink(
6162
_httpClient = httpClient ?? new HttpClient { Timeout = TimeSpan.FromSeconds(30) };
6263
}
6364

64-
public void Log(LogEvent logEvent)
65+
public override void Log(LogEvent logEvent)
6566
{
6667
ArgumentNullException.ThrowIfNull(logEvent);
6768
LogBatch([logEvent]);

src/Herald.Sinks.ApplicationInsightsSdk/ApplicationInsightsLogSink.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Microsoft.ApplicationInsights.DataContracts;
99
using Microsoft.ApplicationInsights.Extensibility;
1010
using MMP.Herald;
11+
using MMP.Herald.Sinks;
1112
using MMP.Herald.Pipeline;
1213
using LogEvent = MMP.Herald.Events.LogEvent;
1314

@@ -33,7 +34,7 @@ namespace Herald.Sinks.ApplicationInsightsSdk;
3334
/// pass <c>InstrumentationKey={key}</c>.
3435
/// </para>
3536
/// </remarks>
36-
public sealed class ApplicationInsightsLogSink : ILogger, IBatchedLogSink, IDisposable
37+
public sealed class ApplicationInsightsLogSink : HeraldSinkBase, IBatchedLogSink, IDisposable
3738
{
3839
private readonly TelemetryClient _client;
3940
private readonly TelemetryConfiguration? _ownedConfig;
@@ -58,7 +59,7 @@ public ApplicationInsightsLogSink(TelemetryClient client)
5859
_ownedConfig = null;
5960
}
6061

61-
public void Log(LogEvent logEvent)
62+
public override void Log(LogEvent logEvent)
6263
{
6364
ArgumentNullException.ThrowIfNull(logEvent);
6465

src/Herald.Sinks.AwsCloudWatch/AwsCloudWatchLogSink.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using Amazon.CloudWatchLogs;
1414
using Amazon.CloudWatchLogs.Model;
1515
using MMP.Herald;
16+
using MMP.Herald.Sinks;
1617
using MMP.Herald.Pipeline;
1718
using MMP.Herald.Services;
1819
// AWS SDK ships its own LogEvent type in Amazon.CloudWatchLogs.Model.
@@ -51,7 +52,7 @@ namespace Herald.Sinks.AwsCloudWatch;
5152
/// failing the batch.
5253
/// </para>
5354
/// </remarks>
54-
public sealed class AwsCloudWatchLogSink : ILogger, IBatchedLogSink, IDisposable
55+
public sealed class AwsCloudWatchLogSink : HeraldSinkBase, IBatchedLogSink, IDisposable
5556
{
5657
private const int MaxBatchEvents = 10_000;
5758
private const int MaxEventBytes = 262_144; // 256 KB single-event ceiling
@@ -109,7 +110,7 @@ public AwsCloudWatchLogSink(
109110
_autoCreateLogStream = autoCreateLogStream;
110111
}
111112

112-
public void Log(LogEvent logEvent)
113+
public override void Log(LogEvent logEvent)
113114
{
114115
ArgumentNullException.ThrowIfNull(logEvent);
115116
LogBatch(new[] { logEvent });

src/Herald.Sinks.Axiom/AxiomLogSink.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using System.Text;
1111
using System.Text.Json;
1212
using MMP.Herald;
13+
using MMP.Herald.Sinks;
1314
using MMP.Herald.Pipeline;
1415
using LogEvent = MMP.Herald.Events.LogEvent;
1516

@@ -20,7 +21,7 @@ namespace Herald.Sinks.Axiom;
2021
/// (api.axiom.co/v1/datasets/{dataset}/ingest). Bearer-token auth, JSON
2122
/// array body. HTTP-only.
2223
/// </summary>
23-
public sealed class AxiomLogSink : ILogger, IBatchedLogSink, IDisposable
24+
public sealed class AxiomLogSink : HeraldSinkBase, IBatchedLogSink, IDisposable
2425
{
2526
private const string DefaultBase = "https://api.axiom.co/v1/datasets/";
2627

@@ -39,7 +40,7 @@ public AxiomLogSink(string apiToken, string dataset, string? baseUrl = null, Htt
3940
_http = httpClient ?? new HttpClient { Timeout = TimeSpan.FromSeconds(30) };
4041
}
4142

42-
public void Log(LogEvent logEvent) => LogBatch(new[] { logEvent });
43+
public override void Log(LogEvent logEvent) => LogBatch(new[] { logEvent });
4344

4445
public void LogBatch(IReadOnlyList<LogEvent> events)
4546
{

src/Herald.Sinks.AzureAnalytics/AzureAnalyticsLogSink.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using System.Text.Json;
1313
using System.Threading;
1414
using MMP.Herald;
15+
using MMP.Herald.Sinks;
1516
using MMP.Herald.Events;
1617
using MMP.Herald.Pipeline;
1718
using MMP.Herald.Services;
@@ -47,7 +48,7 @@ namespace Herald.Sinks.AzureAnalytics;
4748
/// to ~30,000 events per batch, far above typical pipeline sizing.
4849
/// </para>
4950
/// </remarks>
50-
public sealed class AzureAnalyticsLogSink : ILogger, IBatchedLogSink, IDisposable
51+
public sealed class AzureAnalyticsLogSink : HeraldSinkBase, IBatchedLogSink, IDisposable
5152
{
5253
private const string ApiVersion = "2016-04-01";
5354
private const string ResourcePath = "/api/logs";
@@ -86,7 +87,7 @@ public AzureAnalyticsLogSink(
8687
_httpClient = httpClient ?? new HttpClient { Timeout = TimeSpan.FromSeconds(30) };
8788
}
8889

89-
public void Log(LogEvent logEvent)
90+
public override void Log(LogEvent logEvent)
9091
{
9192
ArgumentNullException.ThrowIfNull(logEvent);
9293
LogBatch(new[] { logEvent });

src/Herald.Sinks.AzureBlobStorage/AzureBlobStorageLogSink.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
using Azure.Storage.Blobs;
1313
using Azure.Storage.Blobs.Models;
1414
using MMP.Herald;
15+
using MMP.Herald.Sinks;
1516
using MMP.Herald.Pipeline;
1617
using MMP.Herald.Services;
1718
using LogEvent = MMP.Herald.Events.LogEvent;
@@ -37,7 +38,7 @@ namespace Herald.Sinks.AzureBlobStorage;
3738
/// tail prevents collisions under concurrent flushes.
3839
/// </para>
3940
/// </remarks>
40-
public sealed class AzureBlobStorageLogSink : ILogger, IBatchedLogSink
41+
public sealed class AzureBlobStorageLogSink : HeraldSinkBase, IBatchedLogSink
4142
{
4243
private readonly BlobContainerClient _container;
4344
private readonly string _keyPrefix;
@@ -74,7 +75,7 @@ public AzureBlobStorageLogSink(
7475
_keyPrefix = keyPrefix.TrimEnd('/');
7576
}
7677

77-
public void Log(LogEvent logEvent)
78+
public override void Log(LogEvent logEvent)
7879
{
7980
ArgumentNullException.ThrowIfNull(logEvent);
8081
LogBatch(new[] { logEvent });

src/Herald.Sinks.AzureCosmosDB/AzureCosmosDbLogSink.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using System.Text.Json;
1111
using Microsoft.Azure.Cosmos;
1212
using MMP.Herald;
13+
using MMP.Herald.Sinks;
1314
using MMP.Herald.Pipeline;
1415
using MMP.Herald.Services;
1516
using LogEvent = MMP.Herald.Events.LogEvent;
@@ -37,7 +38,7 @@ namespace Herald.Sinks.AzureCosmosDB;
3738
/// 1.0 — follow-up feature.
3839
/// </para>
3940
/// </remarks>
40-
public sealed class AzureCosmosDbLogSink : ILogger, IBatchedLogSink, IDisposable
41+
public sealed class AzureCosmosDbLogSink : HeraldSinkBase, IBatchedLogSink, IDisposable
4142
{
4243
private readonly CosmosClient _client;
4344
private readonly bool _ownsClient;
@@ -83,7 +84,7 @@ public AzureCosmosDbLogSink(
8384
_partitionKeyProperty = partitionKeyProperty;
8485
}
8586

86-
public void Log(LogEvent logEvent)
87+
public override void Log(LogEvent logEvent)
8788
{
8889
ArgumentNullException.ThrowIfNull(logEvent);
8990
LogBatch(new[] { logEvent });

0 commit comments

Comments
 (0)