MushCOA.Logging 1.1.0

dotnet add package MushCOA.Logging --version 1.1.0
                    
NuGet\Install-Package MushCOA.Logging -Version 1.1.0
                    
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="MushCOA.Logging" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MushCOA.Logging" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="MushCOA.Logging" />
                    
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 MushCOA.Logging --version 1.1.0
                    
#r "nuget: MushCOA.Logging, 1.1.0"
                    
#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 MushCOA.Logging@1.1.0
                    
#: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=MushCOA.Logging&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=MushCOA.Logging&version=1.1.0
                    
Install as a Cake Tool

MushCOA.Logging

Reusable structured application and audit logging for .NET applications.

Features

  • Structured JSONL application logs
  • Separate audit logs
  • Daily and size-based rolling
  • Configurable retention periods
  • Optional Seq integration

Installation

dotnet add package MushCOA.Logging

Configuration

Add this section to the consuming application's appsettings.json:

{
  "ApplicationLogging": {
    "ApplicationName": "MyApplication",
    "MinimumLevel": "Information",
    "Files": {
      "Enabled": true,
      "Directory": "Logs",
      "FileSizeLimitMB": 25,
      "ApplicationRetentionDays": 30,
      "AuditRetentionDays": 180
    },
    "Seq": {
      "Enabled": false,
      "ServerUrl": "http://localhost:5341",
      "ApiKey": null
    }
  }
}

Registration

Register logging in the consuming application's Program.cs:

using Microsoft.Extensions.Hosting;
using MushCOA.Logging.Configuration;

var builder = Host.CreateApplicationBuilder(args);

builder.AddApplicationLogging();

Application Logging

Use the standard ILogger<T> interface:

private readonly ILogger<MyService> _logger;

_logger.LogInformation(
    "Processed {RecordCount} inventory records",
    recordCount);

Audit Logging

Inject and use IAuditLogger:

using MushCOA.Logging.Audit;

private readonly IAuditLogger _auditLogger;

_auditLogger.Log(
    new AuditEvent
    {
        Action = "AssetUpdated",
        EntityType = "Asset",
        EntityId = assetId.ToString(),
        Result = AuditResult.Success,
        Details = new
        {
            AssetTag = "WTR-12345"
        }
    });

Log Output

Logs
├── Application
│   └── application-20260728.jsonl
└── Audit
    └── audit-20260728.jsonl

Source

https://github.com/MushCOA/Logging

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

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MushCOA.Logging:

Package Downloads
MushCOA.Logging.AspNetCore

ASP.NET Core integration for MushCOA.Logging, including HTTP request, correlation, and authenticated-user context.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 143 7/29/2026
1.0.0 111 7/28/2026