agentsclimarketplace

Configuring python logging

Skill narumiruna/skills/skills/python/configuring-python-logging

Install
npx -y skills add narumiruna/skills --skill configuring-python-logging

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 8 stars8 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Choose, configure, or review Python logging for libraries, services, apps, and CLIs, especially when deciding between stdlib logging and Loguru or defining handlers, levels, context, and exception behavior.

SKILL.md

2.1 KB, as published. Nobody here has run it

Python Logging

Choose the logging boundary before choosing syntax.

Decision

  • Use stdlib logging for reusable libraries, long-lived services, mixed ecosystems, and standard Sentry/OpenTelemetry or handler integration.
  • Consider Loguru for a small app or CLI that owns process startup and the full logging surface.
  • In mixed systems, keep libraries on stdlib logging and let the application own any deliberate bridge.

Workflow

  1. Inspect the existing logging stack, entry points, deployment environment, and operational integrations.
  2. Keep libraries passive: create logging.getLogger(__name__); do not configure process-wide handlers or levels during import.
  3. Configure logging once at the app or CLI boundary. Prevent duplicate handlers or sinks when setup can run repeatedly.
  4. Set levels and formats for the actual audience. Add structured fields at a defined boundary and provide defaults when third-party records use the same formatter.
  5. Preserve exception semantics: log tracebacks without silently swallowing failures unless recovery is intentional and tested.
  6. Add file, network, telemetry, or other data-egress sinks only when requested or already established by project policy; external destinations require explicit authorization and secret-safe configuration.
  7. Exercise representative application, library, third-party, and exception records. Report the backend chosen, configuration boundary, checks run, and any integration caveat.

Focused References

  • Read references/logging.md for stdlib logger, handler, context, and exception patterns.
  • Read references/loguru.md only when the application owns Loguru configuration.

Do not mix backends without an explicit ownership and interoperability plan, hide global setup in imported modules, or add sinks inside repeatedly called functions.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.