![]() |
VOOZH | about |
dotnet add package Proxmea.ILoggerN --version 1.1.5.25259
NuGet\Install-Package Proxmea.ILoggerN -Version 1.1.5.25259
<PackageReference Include="Proxmea.ILoggerN" Version="1.1.5.25259" />
<PackageVersion Include="Proxmea.ILoggerN" Version="1.1.5.25259" />Directory.Packages.props
<PackageReference Include="Proxmea.ILoggerN" />Project file
paket add Proxmea.ILoggerN --version 1.1.5.25259
#r "nuget: Proxmea.ILoggerN, 1.1.5.25259"
#:package Proxmea.ILoggerN@1.1.5.25259
#addin nuget:?package=Proxmea.ILoggerN&version=1.1.5.25259Install as a Cake Addin
#tool nuget:?package=Proxmea.ILoggerN&version=1.1.5.25259Install as a Cake Tool
Proxmea.ILoggerN provides a shared, configurable logging setup for .NET 8 applications using NLog, with a focus on minimal code and settings inside your project to get up running. It enables consistent, centralized logging across your application, supporting both console, file and Elastic outputs by default. It also adds missing functionality to be able to log individual properties. The package is designed for easy integration with ASP.NET Core projects and leverages dependency injection for logger access.
It's utilizing NLog as the logging provider, mainly because of its high performance.
.WithProperty, so we've implemented that here. Easy peasy to use.appsettings.[environment].json. This effectivly makes your NLog section very small.Program.cs, add controllers and configure logging:var builder = WebApplication.CreateBuilder(args);
SharedLogging.ConfigureNLog(builder);
var app = builder.Build();
ServicesHelper.Configure(app.Services);
var logger = LoggerHelper.GetLogger<Program>();
logger.LogInformation("Starting");
logger
.WithProperty("Version", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version)
.LogInformation("Application started with properties.");
ILogger<T> and use as needed:public class HelloWorldController : Controller
{
private readonly ILogger<HelloWorldController> _logger;
public HelloWorldController(ILogger<HelloWorldController> logger)
{
_logger = logger;
}
[HttpGet]
public IActionResult GetHello() {
_logger.LogInformation("GetHello called.");
return Ok("HelloBack");
}
}
Default NLog settings are in Proxmea.ILoggerN.Default.AppSettings.json.
This serves as boilerplate config for NLog.
Override or extend logging in your own appsettings.[environment].json.
This is where you'd put your application specific minimal NLog config.
HelloWorld2025-06-11 18:41:54.2293 HelloWorld INFO HelloWorld.Program Starting
2025-06-11 18:41:54.2526 HelloWorld INFO HelloWorld.Program Environment: Production
2025-06-11 18:41:54.2553 HelloWorld INFO HelloWorld.Program Application started with properties. Version=1.0.73.25162
2025-06-11 18:41:58.5665 HelloWorld INFO HelloWorld.Controllers.HelloWorldController GetHello called. ConnectionId=0HND90RH1Q3UT, RequestId=0HND90RH1Q3UT:00000001, RequestPath=/HelloWorld, ActionId=d60d08d9-a508-4200-94ee-84a09af2dfd1, ActionName=HelloWorld.Controllers.HelloWorldController.GetHello (HelloWorld)
| Version | Description |
|---|---|
| v1.1.5.25259 (2025-09-16) | Added default (optional) logging of unhandled exceptions. Changed to work with non-web apps. Updated NuGets. |
| v1.0.62.25174 (2025-06-23) | Changed Elastic layout to be async to prevent blocking the main thread on Elastic failure. Updated default console layout to colour output. |
| v1.0.49.251620 (2025-06-11) | Initial Release |
This project is available under a Mozilla Public License 2.0 (MPL-2.0):
Developed and maintained by jrnker@Proxmea. For inquiries, issues, or contributions, check out the repository or open a pull request.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.5.25259 | 438 | 9/16/2025 |
| 1.0.62.25174 | 235 | 6/23/2025 |
| 1.0.49.25162 | 358 | 6/11/2025 |