Cerbi.MEL.Governance
1.0.17
See the version list below for details.
dotnet add package Cerbi.MEL.Governance --version 1.0.17
NuGet\Install-Package Cerbi.MEL.Governance -Version 1.0.17
<PackageReference Include="Cerbi.MEL.Governance" Version="1.0.17" />
<PackageVersion Include="Cerbi.MEL.Governance" Version="1.0.17" />
<PackageReference Include="Cerbi.MEL.Governance" />
paket add Cerbi.MEL.Governance --version 1.0.17
#r "nuget: Cerbi.MEL.Governance, 1.0.17"
#:package Cerbi.MEL.Governance@1.0.17
#addin nuget:?package=Cerbi.MEL.Governance&version=1.0.17
#tool nuget:?package=Cerbi.MEL.Governance&version=1.0.17
Cerbi.MEL.Governance (In Draft)
Real-time logging governance enforcement for Microsoft.Extensions.Logging (MEL) using the Cerbi validation engine.
Cerbi.MEL.Governance is part of the Cerbi suite. It enables runtime validation of log fields based on structured governance profiles. Built for ASP.NET Core, Worker Services, Azure Functions, and any .NET app using Microsoft.Extensions.Logging.
🚀 Features
- ✅ Enforce required and forbidden fields
- ✅ Drop or tag logs with governance violations
- ✅ Allow relaxed logs (
Relax()
mode) - ✅ Supports structured logging and
BeginScope
- ✅ Supports
[CerbiTopic("...")]
profile routing via caller class detection (using injectedCerbiTopic
field) - ✅ Compatible with any MEL-compatible sink (Console, File, Seq, etc.)
📆 Installation
dotnet add package Cerbi.MEL.Governance
🛠 Setup
1. Add a governance config file
{
"EnforcementMode": "Strict",
"LoggingProfiles": {
"Orders": {
"FieldSeverities": {
"userId": "Required",
"email": "Required",
"password": "Forbidden"
},
"AllowRelax": true,
"RequireTopic": true,
"AllowedTopics": ["Orders"]
}
}
}
Save this as cerbi_governance.json
in your project root.
2. Configure MEL to use Cerbi governance
using Microsoft.Extensions.Logging;
using Cerbi.MEL.Governance;
builder.Logging.AddCerbiGovernance(options =>
{
options.Profile = "Orders"; // default fallback
options.ConfigPath = "cerbi_governance.json";
});
🔹 Optional: Use [CerbiTopic("...")] to route logs to specific profiles
[CerbiTopic("Orders")]
public class OrderService
{
private readonly ILogger<OrderService> _logger;
public OrderService(ILogger<OrderService> logger)
{
_logger = logger;
}
public void Process()
{
_logger.LogInformation("Order processed for {userId}", "abc123");
}
}
✅ This works via automatic injection of the topic into the log fields. The logger sets the
CerbiTopic
field at runtime if the caller class has the[CerbiTopic("...")]
attribute.
✍️ Example Logging
logger.LogInformation("User info: {userId} {email}", "abc123", "test@example.com");
// Violates governance (missing userId)
logger.LogInformation("Only email provided: {email}", "test@example.com");
// Forbidden field
logger.LogInformation("Password in log: {userId} {email} {password}", "abc123", "test@example.com", "secret");
🧐 Governance Output
If governance enrichment is enabled, the logger can tag entries like:
{
"GovernanceProfileUsed": "Orders",
"GovernanceViolations": ["MissingField:userId"],
"GovernanceRelaxed": false
}
🔗 Related Projects
- 🌐 CerbiStream — Core logging library
- ⚙️ Cerbi.Serilog.Governance
- 🔧 Cerbi.Governance.Runtime
- 📘 Cerbi Docs
Product | Versions 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 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. |
-
net8.0
- Cerbi.Governance.Core (>= 1.0.2)
- Cerbi.Governance.Runtime (>= 1.1.1)
- Microsoft.Extensions.Logging (>= 9.0.5)
- Microsoft.Extensions.Logging.Console (>= 9.0.5)
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 |
---|---|---|
1.0.37 | 150 | 6/5/2025 |
1.0.35 | 138 | 6/4/2025 |
1.0.34 | 129 | 6/4/2025 |
1.0.33 | 138 | 6/4/2025 |
1.0.32 | 145 | 6/4/2025 |
1.0.31 | 95 | 6/1/2025 |
1.0.30 | 100 | 6/1/2025 |
1.0.29 | 95 | 6/1/2025 |
1.0.28 | 106 | 5/31/2025 |
1.0.27 | 105 | 5/31/2025 |
1.0.26 | 103 | 5/31/2025 |
1.0.25 | 99 | 5/31/2025 |
1.0.24 | 100 | 5/31/2025 |
1.0.23 | 105 | 5/31/2025 |
1.0.22 | 70 | 5/31/2025 |
1.0.21 | 76 | 5/31/2025 |
1.0.20 | 73 | 5/31/2025 |
1.0.19 | 70 | 5/31/2025 |
1.0.18 | 65 | 5/31/2025 |
1.0.17 | 70 | 5/30/2025 |
1.0.16 | 68 | 5/30/2025 |
1.0.15 | 148 | 5/27/2025 |
1.0.14 | 139 | 5/27/2025 |
1.0.13 | 140 | 5/27/2025 |
1.0.12 | 146 | 5/26/2025 |
1.0.11 | 143 | 5/26/2025 |
1.0.10 | 140 | 5/26/2025 |
1.0.9 | 148 | 5/26/2025 |
1.0.8 | 142 | 5/26/2025 |
1.0.7 | 145 | 5/26/2025 |
1.0.6 | 142 | 5/26/2025 |
1.0.5 | 143 | 5/26/2025 |
1.0.4 | 146 | 5/26/2025 |
1.0.3 | 148 | 5/26/2025 |
1.0.2 | 146 | 5/26/2025 |
1.0.1 | 141 | 5/26/2025 |
1.0.0 | 144 | 5/26/2025 |