dotnet-nlog-logging

Community

Standardize NLog logging in .NET apps.

AuthorMuhomorik
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This guide enforces consistent NLog usage across .NET projects, ensuring ILogger integration, proper DI patterns, and unified logging practices to reduce runtime errors and improve observability.

Core Features & Use Cases

  • Enforce using NLog.ILogger (not Microsoft.Extensions.Logging.ILogger) to avoid mismatches
  • Require the logger to be the first constructor parameter and resolve it via DI
  • Provide concrete patterns for logging calls, including deferred formatting and common log levels
  • Include practical examples for Autofac registration and NLog.config setup to standardize configuration across apps
  • Use cases include backend services and libraries that rely on DI and structured logging with NLog

Quick Start

Configure a .NET project to use NLog by injecting NLog.ILogger as the first constructor parameter and following the conventions outlined.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: dotnet-nlog-logging
Download link: https://github.com/Muhomorik/KanelBulleKapital/archive/main.zip#dotnet-nlog-logging

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.