kata-python-logging-setup

Official

Standardize secure JSON logs with correlation.

Authorguardiatechnology
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves the problem of inconsistent, unstructured logging by helping you implement a repeatable Loguru-based pattern that emits reliable JSON records with redaction and correlation for traceability.

Core Features & Use Cases

  • Bootstrap secure logging: Configure Loguru sinks to output both readable and structured JSON, while disabling sensitive diagnostic backtrace/diagnose.
  • Decorator-based instrumentation: Add a @logged decorator that logs enter/exit/error events, captures duration, and supports both sync and async functions.
  • Redaction and payload shaping: Redact sensitive fields and emit consistent JSON payloads (including trace/span/correlation identifiers) with minimal exception exposure.
  • OpenTelemetry + correlation integration: Instrument logging with OpenTelemetry and propagate correlation_id via HTTP middleware.

Quick Start

Ask your AI to implement the Loguru JSON logging bootstrap, the @logged decorator (sync/async), correlation middleware, and the Ruff + AST pre-commit policy to remove inline logger.* calls outside the allowlist.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: kata-python-logging-setup
Download link: https://github.com/guardiatechnology/design-system/archive/main.zip#kata-python-logging-setup

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.