dotnet-logging-serilog

Configure Serilog with ILogger abstractions for standardized .NET application logging.

1|1|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/mcj-coder/development-skills --skill dotnet-logging-serilog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-logging-serilog
Source: https://github.com/mcj-coder/development-skills/tree/main/skills/dotnet-logging-serilog
Command: npx skills add https://github.com/mcj-coder/development-skills --skill dotnet-logging-serilog

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures consistent, structured logging across .NET applications using Serilog, making it easier to monitor application health and diagnose issues, especially during startup.

Core Features & Use Cases

  • Standardized Logging: Enforces the use of ILogger/ILogger<T> abstractions with Serilog as the provider.
  • Startup Exception Handling: Guarantees that exceptions occurring during application startup are logged at a Critical severity for immediate visibility.
  • Integration: Supports integration with Azure Application Insights and OpenTelemetry for comprehensive observability.
  • Use Case: When building a new ASP.NET Core microservice, use this Skill to configure Serilog, ensuring all startup errors are critical and that logs can be easily queried in Application Insights.

Quick Start

Configure Serilog for your ASP.NET Core application to ensure startup exceptions are logged as Critical.

Frequently Asked Questions about dotnet-logging-serilog

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Serilog for structured logging in ASP.NET Core?

Configure Serilog in ASP.NET Core by using the ILogger abstractions with Serilog as the logging provider, ensuring consistent structured logging across your microservices to monitor application health.

How do I log startup exceptions as Critical in .NET applications?

Logging startup exceptions as Critical is handled by standardizing your .NET logging configuration with Serilog, guaranteeing that any application initialization failures are logged for immediate visibility.

Does Serilog work with Application Insights and OpenTelemetry in .NET?

Yes, Serilog supports integration with Azure Application Insights and OpenTelemetry, enabling comprehensive observability and allowing structured logs to be easily queried within your operational tooling.

Why use ILogger abstractions instead of Serilog directly in .NET?

Using ILogger abstractions instead of direct Serilog references decouples your application code from the logging provider, allowing you to standardize .NET logging while retaining Serilog's structured output capabilities.

What is the best way to standardize .NET logging across microservices?

Standardizing .NET logging across microservices is achieved by enforcing the use of ILogger abstractions with Serilog as the provider, ensuring consistent diagnostic data and application health monitoring.

Can I use Serilog to monitor application startup failures in .NET?

Yes, you can use Serilog to monitor application startup failures by configuring it to capture initialization exceptions and log them at a Critical severity level for immediate operational visibility.