skills-catalog/ln-771-logging-configurator/SKILL.md
Configures structured JSON logging with Serilog (.NET) or structlog (Python). Use when adding logging to backend projects.
npx skillsauth add levnikolaevich/claude-code-skills ln-771-logging-configuratorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Type: L3 Worker Category: 7XX Project Bootstrap
Configures structured JSON logging for .NET and Python projects.
| Aspect | Details | |--------|---------| | Input | Context Store from ln-770 | | Output | Logging configuration files | | Stacks | .NET (Serilog), Python (structlog) |
Accept Context Store from coordinator.
Required Context:
STACK: .NET or PythonFRAMEWORK: ASP.NET Core or FastAPIFRAMEWORK_VERSION: Version numberPROJECT_ROOT: Project directory pathENVIRONMENT: Development or ProductionValidation:
STACK not provided, detect from project filesUse MCP tools to get up-to-date documentation.
For .NET (Serilog):
MCP ref: "Serilog ASP.NET Core structured logging configuration"
Context7: /serilog/serilog-aspnetcore
For Python (structlog):
MCP ref: "structlog Python structured logging configuration"
Context7: /hynek/structlog
Key Patterns to Research:
Ask user for configuration preferences.
| Option | When to Use | |--------|-------------| | JSON (Recommended for Production) | Machine-readable, log aggregation systems | | Pretty/Colored (Recommended for Development) | Human-readable, local debugging |
| Field | Description | Default |
|-------|-------------|---------|
| correlationId | Request tracking across services | ✓ Yes |
| userId | Authenticated user identifier | ✓ Yes |
| requestPath | HTTP request path | ✓ Yes |
| responseTime | Request duration in ms | ✓ Yes |
| machineName | Server hostname | Optional |
| threadId | Thread identifier | Optional |
| Sink | Use Case | |------|----------| | Console | Always enabled | | File | Local persistence, log rotation | | Seq | Structured log server | | Elasticsearch | Log aggregation at scale |
| Level | Development | Production | |-------|-------------|------------| | Default | Debug | Information | | Microsoft.* | Information | Warning | | System.* | Information | Warning | | Application | Debug | Information |
Generate files based on stack and decisions.
| File | Purpose |
|------|---------|
| Extensions/LoggingExtensions.cs | Service registration |
| appsettings.json (update) | Serilog configuration |
| appsettings.Development.json (update) | Dev overrides |
Generation Process:
Packages to Add:
Serilog.AspNetCoreSerilog.Sinks.ConsoleSerilog.Sinks.File (if File sink selected)Serilog.Enrichers.Environment (if machineName selected)| File | Purpose |
|------|---------|
| core/logging_config.py | structlog configuration |
| middleware/logging_middleware.py | Request logging |
Generation Process:
Packages to Add:
structlogpython-json-logger (if JSON format)Verify the configuration works.
Validation Steps:
Check imports: Ensure all packages are available
dotnet list package | grep Serilogpip list | grep structlogSyntax check:
dotnet build --no-restorepython -m py_compile core/logging_config.pyTest log output:
Expected Log Format:
{
"timestamp": "2026-01-10T12:00:00.000Z",
"level": "info",
"message": "Request completed",
"correlationId": "abc-123",
"requestPath": "/api/health",
"responseTime": 45,
"statusCode": 200
}
Return result to ln-770:
{
"status": "success",
"files_created": [
"Extensions/LoggingExtensions.cs",
"appsettings.json"
],
"packages_added": [
"Serilog.AspNetCore",
"Serilog.Sinks.Console"
],
"registration_code": "services.AddLoggingServices(configuration);",
"message": "Configured structured logging with Serilog"
}
This skill is idempotent:
{ "status": "skipped", "message": "Logging already configured" }status: "skipped" immediatelyfiles_created, packages_added, registration_code for coordinator aggregationdotnet build or py_compile)Version: 2.0.0 Last Updated: 2026-01-10
testing
Drafts and publishes fact-checked GitHub Discussions announcements. Use for releases, updates, or project news; not for release creation or issue responses.
testing
Prepares and publishes a tagged GitHub release from repository evidence. Use for an explicit release request; not for ordinary commits, packages, or community news.
testing
Validates, commits, pushes, and remotely verifies approved repository changes. Use when publication is requested; not for releases, package publishing, or announcements.
development
Reviews standalone skills and their configured distribution surfaces before publication. Use for skill release readiness; not for product code or implementation-plan review.