logging-conventions

Enforce consistent log levels, templates, and correlation scopes for NewsParser code.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/roromanenko/NewsParser --skill logging-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-conventions
Source: https://github.com/roromanenko/NewsParser/tree/main/.claude/skills/logging-conventions
Command: npx skills add https://github.com/roromanenko/NewsParser --skill logging-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This binding reference defines the standard logging rules for NewsParser, ensuring consistent log levels, templates, and correlation scopes across the codebase.

Core Features & Use Cases

  • Enforces a uniform log level matrix, message templates with named placeholders, and BeginScope correlation to attach contextual data to every log line.
  • Provides guidance for API pattern, service-layer logging, and appsettings logging configuration to support predictable observability and security.

Quick Start

Follow these conventions when adding new log calls or auditing existing code to maintain consistency and observability.

Frequently Asked Questions about logging-conventions

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

FAQPage Schema
How do I enforce consistent structured logging and log levels in dotnet?

Use BeginScope correlation in ILogger to attach contextual data to every log line. This ensures predictable, queryable logs by passing scope keys that thread context through service and middleware layers.

What log level should I select for service-layer and middleware logging?

Select log levels based on a uniform matrix that categorizes severity for service-layer and middleware logging. This standardization ensures consistent observability and secure log output across API patterns.

How do I configure appsettings logging for PII safety and structured templates?

Configure appsettings logging by defining rules that enforce structured message templates with named placeholders while ensuring PII safety. This combination yields predictable, queryable, and secure logs.

Does ILogger BeginScope work with AI client log pair conventions for correlation?

Yes, ILogger BeginScope works with AI client log pair conventions by attaching correlation scope keys to log lines. This enables tracing contextual data across AI client interactions and service layers.