Agent skill
python-logging
Use when choosing or configuring Python logging, especially deciding between stdlib logging and loguru for apps or CLIs.
Install this agent skill to your Project
npx add-skill https://github.com/narumiruna/agent-skills/tree/main/skills/python-logging
SKILL.md
Python Logging
Overview
Choose the logging system based on project needs. Core principle: stdlib logging for libraries and ecosystem integration, loguru for fast, simple app/CLI logging.
Quick Reference
| Need | Use |
|---|---|
| Library or long-lived service | stdlib logging |
| Simple app or CLI | loguru |
| Integrations (Sentry/OTel) | stdlib logging |
Decision Rules
Use stdlib logging when:
- Building a reusable library
- You need handler hierarchies or integration with ops tooling
Use loguru when:
- You want minimal setup and readable output
- You are building a small app or CLI
Example
Stdlib logger setup:
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.info("App started")
Common Mistakes
- Forcing loguru in a reusable library.
- Mixing two logging systems without a clear boundary.
Red Flags
- Logging recommendations with no rationale for library vs app use.
References
references/logging.md- stdlib logging patternsreferences/loguru.md- loguru patterns
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
slide-creator
Use when creating slide decks with Marp/Marpit Markdown (marp), including authoring slide content, designing slide color schemes, and building SVG diagrams or illustrations for the deck.
slide-color-design
Use when you only need slide color systems, palette selection, or palette generation workflows and want direct pointers to the color design references.
mermaid-creator
Use when creating or converting Mermaid diagrams (for example flowcharts, sequence diagrams, ER diagrams, and Gantt charts), including exporting to SVG for docs or slides.
test-driven-development
Use when implementing non-trivial code changes that should follow TDD (write a failing test first, make the smallest passing change, then refactor safely).
svg-illustration
Use when you need SVG diagram rules, layout patterns, or embedding guidance for slide decks and want the minimal SVG-focused reading path.
python-cli-typer
Use when building or structuring Python CLI commands with Typer, including commands, options, and multi-command apps.
Didn't find tool you were looking for?