Nano.Logging
10.0.0-preview1
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
<PackageReference Include="Nano.Logging" Version="10.0.0-preview1" />
<PackageVersion Include="Nano.Logging" Version="10.0.0-preview1" />
<PackageReference Include="Nano.Logging" />
paket add Nano.Logging --version 10.0.0-preview1
#r "nuget: Nano.Logging, 10.0.0-preview1"
#:package Nano.Logging@10.0.0-preview1
#addin nuget:?package=Nano.Logging&version=10.0.0-preview1&prerelease
#tool nuget:?package=Nano.Logging&version=10.0.0-preview1&prerelease
Nano.Logging
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:
ILoggerFactoryILoggerILogger<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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.Logging (>= 10.0.7)
- Nano.Logging.Abstractions (>= 10.0.0-preview1)
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.