CerbiStream 1.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package CerbiStream --version 1.0.5
                    
NuGet\Install-Package CerbiStream -Version 1.0.5
                    
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="CerbiStream" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CerbiStream" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="CerbiStream" />
                    
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 CerbiStream --version 1.0.5
                    
#r "nuget: CerbiStream, 1.0.5"
                    
#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.
#addin nuget:?package=CerbiStream&version=1.0.5
                    
Install CerbiStream as a Cake Addin
#tool nuget:?package=CerbiStream&version=1.0.5
                    
Install CerbiStream as a Cake Tool

CerbiStream Logging Library

CerbiStream is a next-generation logging solution built for structured logs, governance enforcement, and multi-destination routing. It ensures secure, consistent, and high-performance logging for cloud, on-prem, and hybrid environments.


πŸš€ What's New?

  • Governance Enforcement – Define and enforce structured logging standards dynamically.
  • Governance Analyzer – Uses Roslyn to validate logs at build time, reducing runtime validation overhead.
  • Dynamic Governance Reload – Governance rules can now reload in real time when the JSON config changes.
  • Log Level Enforcement – Restrict logging to allowed levels for better control.
  • Plug-and-Play Cloud Detection – Auto-detects environment (AWS, Azure, GCP, On-Prem).
  • Dev Mode – Prevents logs from being sent to external queues while debugging.
  • Secure & NPI-Free Data Collection – Captures useful metadata without storing sensitive user data.

If you want Governance Enforcement, also install:

dotnet add package CerbiStream.GovernanceAnalyzer

πŸ“¦ Installation

Install CerbiStream from NuGet:

dotnet add package CerbiStream

πŸ“¦ Installation

Install CerbiStream from NuGet:

dotnet add package CerbiStream

If you want Governance Enforcement, also install:

dotnet add package CerbiStream.GovernanceAnalyzer

⚑ Quick Start (Minimal Setup) With CerbiStream, you can integrate logging in seconds.

using System;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using CerbiStream.Logging.Extensions;

```csharp
class Program
{
    static void Main()
    {
        var serviceProvider = new ServiceCollection()
            .AddLogging(builder =>
            {
                builder.AddConsole();
                builder.AddCerbiStream(options =>
                {
                    options.SetQueue("RabbitMQ", "localhost", "logs-queue");
                    options.EnableDevMode();
                    options.EnableGovernance();
                });
            })
            .BuildServiceProvider();

        var logger = serviceProvider.GetRequiredService<ILogger<Program>>();

        logger.LogInformation("Application started successfully!");
        logger.LogError("This is a test error log.");
        logger.LogWarning("Potential issue detected.");
        logger.LogCritical("Critical failure occurred!");
    }
}

πŸ› οΈ Advanced Configuration

If you need more control, you can configure CerbiStream dynamically.

var config = new CerbiStreamOptions();
config.SetQueue("Kafka", "kafka://broker-url", "app-logs");
config.DisableDevMode();
config.EnableGovernance();
config.IncludeAdvancedMetadata();

var logger = new CerbiStreamLogger(config);

🌐 Supported Logging Destinations

Queue Type Example Usage
RabbitMQ QueueType = "RabbitMQ"
Kafka QueueType = "Kafka"
Azure Queue Storage QueueType = "AzureQueue"
Azure Service Bus QueueType = "AzureServiceBus"
AWS SQS QueueType = "AWS_SQS"
AWS Kinesis QueueType = "AWS_Kinesis"
Google Pub/Sub QueueType = "GooglePubSub"

πŸ” Automatic Metadata (No Setup Required)

Metadata Field Auto-Detected? Example Value
CloudProvider βœ… Yes AWS, Azure, GCP, On-Prem
Region βœ… Yes us-east-1, eu-west-2
Environment βœ… Yes Development, Production
ApplicationVersion βœ… Yes v1.2.3
RequestId βœ… Yes (Generated) abc123
TransactionType ❌ Developer Sets REST, gRPC, Kafka
TransactionStatus ❌ Developer Sets Success, Failed

πŸ” Governance & Structured Logging

Governance allows organizations to enforce structured logging signatures by:

  • βœ… Defining required fields (e.g., every log must include UserId, RequestId, etc.).
  • βœ… Allowing optional fields that developers can extend dynamically.
  • βœ… Using a governance configuration file (cerbi_governance.json) for dynamic updates. Example Governance JSON:
{
  "LoggingProfiles": {
    "TransactionLog": {
      "RequiredFields": ["TransactionId", "UserId", "Amount"],
      "OptionalFields": ["DiscountCode"]
    },
    "SecurityLog": {
      "RequiredFields": ["UserId", "IPAddress"],
      "OptionalFields": ["DeviceType"]
    }
  }
}

If GovernanceEnabled = true, logs must match the configured structure.

βœ… Governance Analyzer (Build-Time Validation)

CerbiStream GovernanceAnalyzer uses Roslyn to validate log compliance at build time. This ensures structured logs without runtime overhead.

πŸ›  Debug Mode (Local Development) CerbiStream prevents queue logging while debugging. This is enabled by default (EnableDevMode = true).

var config = new CerbiStreamOptions();
config.EnableDevMode();

var logger = new CerbiStreamLogger(config);
await logger.LogEventAsync("Debugging locally", LogLevel.Debug);

πŸ“Š Meta Data Sharing (Opt-In)

CerbiStream collects aggregate trends across applications for AI-powered insights. βœ… No Personally Identifiable Information (PII) is stored.

If enabled, your logs contribute to global analytics (Error Trends, Cloud Performance, API Response Issues). If disabled, your logs remain 100% private.

var config = new CerbiStreamOptions();
config.IncludeAdvancedMetadata();
config.IncludeSecurityMetadata();

πŸ”₯ Why Use CerbiStream?

  • βœ… No External Dependencies – Just install & start logging.
  • πŸš€ Optimized Performance – Logs lightweight metadata automatically.
  • πŸ”’ Security First – Encrypts fields and ensures NPI-free logging.
  • 🌍 Global Insights – Identify patterns across industries (if opted-in).
  • ⚑ Minimal Setup – Works out-of-the-box with simple constructor injection.

πŸ“œ License CerbiStream is open-source and available under the MIT License.

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 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. 
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
1.0.15 34 4/7/2025
1.0.14 41 4/6/2025
1.0.13 97 3/28/2025
1.0.12 92 3/27/2025
1.0.11 427 3/26/2025
1.0.10 450 3/25/2025
1.0.9 122 3/23/2025
1.0.8 39 3/22/2025
1.0.7 102 3/21/2025
1.0.6 112 3/20/2025
1.0.5 118 3/20/2025
1.0.4 110 3/19/2025
1.0.3 110 3/19/2025
1.0.2 129 3/12/2025
1.0.1 119 3/12/2025