Custom Field Logging with NLog and Oracle

Oracle Table Schema for NLog Integration Create a data base table to store structured log entries: CREATE TABLE APPLICATION_LOGS ( log_id VARCHAR2(60) NOT NULL, application VARCHAR2(20), component VARCHAR2(30), function_name VARCHAR2(30), action_type VARCHAR2(20), source_class VARCHAR2(500), message ...

Posted on Sat, 19 Sep 2026 16:51:22 +0000 by PRodgers4284

Integrating NLog in a .NET Core Web API

1. Installing the NLog Packages Add the following NuGet packages to your project: NLog NLog.Web.AspNetCore These can be installed via the Package Manager Console or the .NET CLI. 2. Configuring NLog Create an NLog.config XML file in the project root. Set its Build Action to Content and Copy to Output Directory to Copy if newer. Below is a sam ...

Posted on Thu, 03 Sep 2026 16:41:06 +0000 by mgzee

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