setup-logging

Automate Python logging setup with environment-specific configurations and rotation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually configuring logging for every project is error-prone and inconsistent; this skill automates the creation of a standardized, environment-aware Python logging setup.

Core Features & Use Cases

  • Automated scaffolding of logging with console and file rotation, environment-specific configurations, and context management.
  • JSON logging support, context propagation, and built-in security through sensitive data masking.
  • Use cases include provisioning logging for API services, background workers, and microservices with observable, auditable logs.

Quick Start

Run setup-logging to automatically generate the logging configuration for your project and enable environment-specific logging behavior.

Frequently Asked Questions about setup-logging

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

FAQPage Schema
How do I automate Python logging configuration across multiple environments?

Automate Python logging configuration by generating a standardized, environment-aware setup that applies consistent formatting and rotation rules to development, staging, and production workflows.

What is the best way to configure JSON logging for a Python production environment?

Configuring JSON logging for a Python production environment is handled through automated scaffolding that supports optional JSON formatting, enabling observable and auditable logs for API services and microservices.

How do I set up log rotation and sensitive data masking in Python?

Set up log rotation and sensitive data masking by initializing an automated logging configuration that includes built-in security measures and file rotation for background workers and services.

Does this automated logging setup require any external Python dependencies?

This automated logging setup requires no external dependencies, as it leverages Python's standard logging library to provision conventional layouts and context propagation across modules.

Can I use this logging configuration for microservices and background workers?

You can use this logging configuration for microservices and background workers, as it provisions observable, auditable logs with context propagation tailored for distributed Python applications.

Why does manually configuring Python logging lead to inconsistencies?

Manually configuring Python logging leads to inconsistencies because it is error-prone, making automated scaffolding necessary to enforce standardized, environment-specific configurations across all project modules.