dev-structured-logs

Solid

Migrate legacy string-based logging in .NET/C# code to structured logging templates, insert CommandHandler logging scopes, and validate or update Serilog File sink settings in appsettings JSON files. Use when users ask to modernize ILogger or Serilog usage through safe rewrites, run dry-run logging migration previews, apply structured logging rewrites, or enforce JSON file sink formatter and path conventions. For general backend design and observability guidance use $software-csharp-backend, for NUnit test design use $qa-testing-nunit, and for pipeline changes use $ops-nuke-cicd.

AI & Automation 80 stars 17 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
64
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Structured Logs Run conservative, review-friendly rewrites for legacy log calls and Serilog JSON config. Default to dry-run and always produce machine-readable preview output. This is an operation skill for deterministic logging rewrites. Do not use it as a general backend observability or CI/CD guidance skill. ## Workflow 1. Run dry-run first: ```bash python .codex/skills/dev-structured-logs/scripts/structured_logs.py --path <repo> --dry-run ``` 2. Review: - `<repo>/patch.diff` - `<repo>/preview-report.json` 3. Apply only after review: ```bash python .codex/skills/dev-structured-logs/scripts/structured_logs.py --path <repo> --apply --backup-dir <dir> ``` 4. Optionally commit: ```bash python .codex/skills/dev-structured-logs/scripts/structured_logs.py --path <repo> --apply --commit-msg "chore: structured logging migration" ``` If the task expands into service design, runtime observability strategy, or API-layer refactoring, switch to `$software-csharp-backend`. If the task expands into `nuke/Build.cs` or CI execution changes, switch to `$ops-nuke-cicd`. ## CLI Contract Support these options: ```bash --path <repo> [--dry-run] [--apply] [--preview-file <path>] [--backup-dir <dir>] [--enable-handler-scope] [--handler-pattern <pattern>] [--log-framework <serilog|microsoft|auto>] [--exclude <glob>] (repeatable) [--commit-msg "message"] ``` Behavior: - Default mode is dry-run when `--apply` is not provided. - CommandHandler scope insertion is disabled by default; e...

Details

Author
vasilyu1983
Repository
vasilyu1983/AI-Agents-public
Created
9 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category