Skip to main content
skill CX Codex

logging-observability — Claude Code skill: logging setup

Adds structured Serilog logging, request correlation, and HTTP request logs for ASP.NET Core Razor Pages. Use it when wiring observability into an app.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add wshaddix/dotnet-skills --skill logging-observability -a claude-code
Open on GitHub

What logging-observability does

This skill provides logging patterns for ASP.NET Core Razor Pages with Serilog. The examples cover structured output, event levels, contextual properties, bootstrap logging, and console or Seq sinks. Request records can include the user, client IP, user agent, route, and HTTP method.

A middleware example handles X-Correlation-Id: it reuses the incoming value or falls back to TraceIdentifier, places the ID in the response, and attaches it to log context. UseSerilogRequestLogging records each request and assigns higher severity to server errors and slow responses.

The target stack is .NET 8+ with nullable reference types enabled. The setup uses Serilog.AspNetCore, Serilog.Expressions, and optionally Serilog.Sinks.Seq.

What it helps with

  • set up structured logs in Razor Pages
  • trace a request across application logs
  • record HTTP requests with Serilog
  • assign levels to errors and slow responses
  • send log events to Seq

Example prompts for the agent

  • Set up structured Serilog logging for this ASP.NET Core Razor Pages app.
  • Add middleware for X-Correlation-Id and log every HTTP request.
  • Show an appsettings.json setup that writes to the console and Seq.

How to install logging-observability

1Skills CLI (Vercel)

npx skills add wshaddix/dotnet-skills --skill logging-observability -a claude-code

2Manually: put the files in place

~/.claude/skills/logging-observability/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/logging-observability/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about logging-observability

How do I install logging-observability in Claude Code?

Run npx skills add wshaddix/dotnet-skills --skill logging-observability -a claude-code, then open ~/.claude/skills/logging-observability/SKILL.md.

What does logging-observability do?

It gives Serilog patterns for structured logs, request context, correlation IDs, and HTTP request logging in ASP.NET Core Razor Pages.

Which .NET version does logging-observability target?

Its patterns target .NET 8+ with nullable reference types enabled.

Similar skills

All skills for Backend and APIs →

From the same set13

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor