Structlog Config
Description
A comprehensive structlog configuration with sensible defaults for development and production environments, featuring context management, exception formatting, and path prettification.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
[](https://github.com/iloveitaly/structlog-config/releases) [](https://pepy.tech/project/structlog-config)  [](https://opensource.org/licenses/MIT)
Opinionated Defaults for Structlog
Logging is really important. Getting logging to work well in python feels like black magic: there's a ton of configuration across structlog, warnings, std loggers, fastapi + celery context, JSON logging in production, etc that requires lots of fiddling and testing to get working. I finally got this working for me in my [project template](https://github.com/iloveitaly/python-starter-template) and extracted this out into a nice package.
Here are the main goals:
- High performance JSON logging in production
- All loggers, even plugin or system loggers, should route through the same formatter
- Structured logging everywhere
- Pytest plugin to easily capture logs and dump to a directory on failure. This is really important for LLMs so they can easily consume logs and context for each test and handle them sequentially.
- Ability to easily set thread-local log context
- Nice log formatters for stack traces, ORM (ActiveModel/SQLModel), etc
- Ability to log level and output (i.e. file path) by logger for easy development debugging
- If you are using fastapi, structured logging for access logs
- Improved exception logging with beautiful-traceback
Installation
uv add structlog-config
Usage
from structlog_config import configure_logger
log = configure_logger()
log.info("the log", key="value")
# named logger just like stdlib
impor
Related Skills
Awesome Go
A curated list of awesome Go frameworks, libraries and software
Development next.js
| The React Framework | 138360 | 1503 | 1 |
Development sharing-skills
skill for guidance.
Development root-cause-tracing
Use when errors occur deep in execution and you need to trace back to find the original trigger.
Development Template Skill
Minimal skeleton for a new skill project structure.
Development Third-party Notices
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THI
Development