MMP.Herald.Sinks.MongoDB 0.2.2

dotnet add package MMP.Herald.Sinks.MongoDB --version 0.2.2
                    
NuGet\Install-Package MMP.Herald.Sinks.MongoDB -Version 0.2.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MMP.Herald.Sinks.MongoDB" Version="0.2.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MMP.Herald.Sinks.MongoDB" Version="0.2.2" />
                    
Directory.Packages.props
<PackageReference Include="MMP.Herald.Sinks.MongoDB" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MMP.Herald.Sinks.MongoDB --version 0.2.2
                    
#r "nuget: MMP.Herald.Sinks.MongoDB, 0.2.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MMP.Herald.Sinks.MongoDB@0.2.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MMP.Herald.Sinks.MongoDB&version=0.2.2
                    
Install as a Cake Addin
#tool nuget:?package=MMP.Herald.Sinks.MongoDB&version=0.2.2
                    
Install as a Cake Tool

Herald.Sinks.MongoDB

Writes Herald log events as BSON documents into a MongoDB collection. Drop-in for Serilog.Sinks.MongoDB. Single InsertOne on Log, unordered InsertMany for IBatchedLogSink batches. Works with capped collections for bounded retention.

Part of Herald — high-performance structured logging for .NET 8, 9, and 10.

Install

dotnet add package Herald.Sinks.MongoDB

The sink auto-registers into LogSinkProviderRegistry.Default via a [ModuleInitializer] on assembly load. No manual RegisterAll(...) or With*SinkProviders() call is required — dotnet add package is the whole workflow.

Sink kind: mongodb (the identifier the Dashboard form and JSON config use to reference this sink).

Capabilities

  • InsertOne per event on the Log path
  • Unordered InsertMany for batches (bad doc does not block the rest)
  • BSON primitive mapping for property values (string, bool, int, long, double, decimal, DateTime, Guid)
  • Code-first overload accepts a pre-built IMongoCollection for shared MongoClient scenarios
  • Works with capped collections for bounded retention

Limitations

  • No TLS / client-cert construction helpers — feed them through the connection string
  • Property values of non-primitive types fall back to ToString()
  • No retention or TTL index management — operator responsibility

Tier & runtime

  • Edition: Community — works on the free Apache 2.0 Herald.Core. No license key required.
  • AOT-compatible: yes
  • Targets: .NET 8 / 9 / 10
  • Thread safety: Thread-safe — the underlying MongoClient is thread-safe per driver contract.

Vendor

MongoDB — https://www.mongodb.com

Configuration

Per-sink config form lives in configuration*.mmpform at the package root and inside the assembly as an embedded resource. The Herald Dashboard renders it at runtime; JSON config follows the same shape. See CAPABILITY.yaml shipped at the package root for the full manifest (schema reference: CAPABILITY-SCHEMA.md).

License

Apache 2.0. Copyright (c) 2026 MMPWorks LLC. See LICENSE shipped at the package root.


Generated from CAPABILITY.yaml. Re-run Modules/Herald.Sinks/tools/generate-readmes.cjs after manifest edits to refresh.

Product Compatible and additional computed target framework versions.
.NET 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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.2.2 97 8/7/2026
0.2.1 110 5/30/2026
0.2.0 115 5/26/2026
0.2.0-alpha.3 79 5/13/2026
0.2.0-alpha.2 60 5/13/2026
0.2.0-alpha.1 65 5/13/2026