Customizing NLog to Write Logs to a Database and Troubleshooting Configuration Issues
NLog is a flexible logging framework for .NET applications that supports writing logs to various targets such as files, databases, and email. This article focuses on configuring NLog to log custom data into a database and addresses a common issue where changes to NLog.config appear to have no effect.
Using Layout Renderers for Custom Log Data
N ...
Posted on Thu, 02 Jul 2026 16:04:45 +0000 by fluvius
Implementing NLog in .NET Applications
NLog provides consistent logging capabilities across various .NET application types including console apps, WinForms, and WPF. This demonstrasion uses a .NET 5 console application.
1. Adding NLog Dependency
There are two approaches to include NLog in your project:
Install via NuGet package manager
Directly reference the NLog.dll assembly
2. C ...
Posted on Mon, 11 May 2026 11:26:45 +0000 by daveoliveruk