Nano.Logging 10.0.0-preview1

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

Nano.Logging

Build and Deploy NuGet NuGet

Logging provider common implementations for Nano applications.

⚠️ This NuGet is transitive and included in other Nano Packages, and is not meant to be included directly.


Table of Contents

Summary

Enabling logging in a Nano application is done by adding a logging provider.
When a provider is registered, Nano automatically registers the following interfaces during application startup:

  • ILoggerFactory
  • ILogger
  • ILogger<T>

All logging providers write to the console by default.
In Staging and Production environments, Kubernetes agents intercept STDOUT and STDERR and stream logs into centralized logging. It is recommended to let the log collector handle log storage and routing, rather than configuring individual applications.

If no logging provider is registered, a NullLogger is used. This means ILogger and ILogger<T> will resolve correctly, but all logs are discarded. Similarly, ILoggerFactory is available but produces no output.

Registration

To enable logging, the logging provider must be registered.
Use the AddNanoLogging<TProvider>() method, specifying your logging provider implementation as the generic type parameter.

...
.ConfigureServices(services =>
{
    services
        .AddNanoLogging<TProvider>();
})
...

Configuration

The Logging section in the configuration defines the logging provider and related settings used by the application.

Setting Type Default Description
LogLevel enum Information The default minimum LogLevel used by the logging provider. Values: Debug, Information, Warning, Error, Fatal.
LogLevelOverrides array [] Optional overrides for specific namespaces, allowing different log levels for different parts of the application.
LogLevelOverrides.Namespace string null The log level to apply for a specific namespace. You may prepend an asterisk (*) as a wildcard to match multiple namespaces.
LogLevelOverrides.LogLevel enum Warning The namespace for which this log level override applies. Values: Debug, Information, Warning, Error, Fatal.
"Logging": {
  "LogLevel": "Information",
  "LogLevelOverrides": 
  [
    {
      "Namespace": "Microsoft",
      "LogLevel": "Warning"
    }
  ]
}

📖 Learn more about Application Configuration here.

Logging Providers

Nano provides several logging providers, so usually there is no need to implement a custom provider for your application.

Logging providers implements the interface ILoggingProvider. It contains a single method Configure(...), that is responsible for handling any configuration and setup required for the logging provider.

To create a new logging provider, implement the ILoggingProvider interface. Make sure to register all required services in the Configure method, and then register your provider with the application using .AddNanoLogging<TProvider>().

The following logging providers are currently supported in Nano.

Product Compatible and additional computed target framework versions.
.NET 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 (5)

Showing the top 5 NuGet packages that depend on Nano.Logging:

Package Downloads
Nano.Logging.Log4Net

This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details.

Nano.Logging.NLog

This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details.

Nano.Logging.Serilog

This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details.

Nano.All

This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details.

Nano.Logging.Microsoft

This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0-preview2 74 4/25/2026
10.0.0-preview1 76 4/24/2026

- .NET 10 support.
- Comprehensive rewrite with performance optimizations, improvements, and bug fixes.
- Not compatible with previous versions of Nano.