logging-conventions

Enforce structured logging with required fields in Python and TypeScript code.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/exerias21/brainstorm-toolkit --skill logging-conventions-exerias21
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-conventions
Source: https://github.com/exerias21/brainstorm-toolkit/tree/main/skills/logging-conventions
Command: npx skills add https://github.com/exerias21/brainstorm-toolkit --skill logging-conventions-exerias21

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces structured logging conventions when writing or modifying backend Python or frontend TypeScript code. This ensures container logs are machine-readable and auditable by the container-log-audit skill, enabling reliable error detection and traceability.

Core Features & Use Cases

  • Standardizes logger usage across the codebase (e.g., using logging.getLogger(name) or structlog) to produce consistent, parseable logs.
  • Enforces required log fields such as category and error_code and outlines proper error/warning log patterns for observability.
  • Guides exception handling to ensure visibility and traceability, reducing silent failures and improving incident response.
  • Applies to backend API endpoints, background jobs, LLM integration code, and frontend code that depends on backend processes.

Quick Start

Follow the project logging conventions in every change to ensure structured, auditable logs.

Frequently Asked Questions about logging-conventions

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

FAQPage Schema
How do I enforce structured logging across backend and frontend code?

Structured logging standardizes logger usage via getLogger or structlog, mandating fields like category and error_code to produce machine-readable container logs that enable reliable error detection and traceability.

Why does my codebase have silent failures and untraceable errors?

Silent failures occur due to unstructured logging and poor exception handling. Enforcing standardized logging practices with mandated fields and proper error patterns reduces silent failures and improves incident response visibility.

What's the best way to standardize logger usage for API routes and background jobs?

The best way to standardize logging for API routes and jobs is applying consistent logger instantiation like getLogger or structlog across the codebase, forbidding silent or unstructured logging to ensure observability.

Does this logging convention support both Python backend services and TypeScript frontend code?

Yes, the logging convention applies to backend Python services, API endpoints, background jobs, LLM integration, and frontend TypeScript code that relies on backend logs, enforcing consistent practices across the entire stack.

How do I make container logs machine-readable for automated auditing?

Make container logs machine-readable by enforcing structured logging with required fields like category and error_code. Using standardized loggers ensures outputs are parseable by container-log-audit tools for reliable error detection.

When should I not use standard logging conventions in my project?

You should not bypass logging conventions when modifying any backend or frontend code, as unstructured or silent logging breaks automated audit trails, reduces traceability, and prevents reliable incident response.