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.