Skip to content

Add architecture documentation - #57

Merged
markbac merged 1 commit into
mainfrom
docs/56-architecture
Oct 3, 2026
Merged

markbac merged 1 commit into
mainfrom
docs/56-architecture

Conversation

@markbac

@markbac markbac commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

There was no architecture documentation, so contributors had to read the whole of log_setup.py to learn how records flow and how the optional pieces fit.

Changes

  • docs/architecture.md covers the package layout and public API, the life of a log record (levels, per-handler filters, formatters, handlers), context layering and why it uses contextvars, environment configuration, the queue path, redaction, optional dependencies and the python-json-logger version differences, typing and packaging, testing, and how to extend the package.
  • Four Mermaid diagrams (a flowchart each for layout, record flow and context, and a sequence diagram for the queue path), with no semicolons in labels. All four were rendered with mermaid-cli to check that they parse.
  • Linked from the README.
  • Tests keep the document linked, free of semicolons in diagrams, in step with pylogkit.__all__ and free of broken relative links.

Verification

  • pytest: 148 passed (latest dependencies) and 126 passed with 22 skipped (no extras). ruff and mypy --strict are clean.

Closes #56

🤖 Generated with Claude Code

https://claude.ai/code/session_01U2nYHVGDdthQpcwNBPbp8r


Generated by Claude Code

## Summary

There was no architecture documentation, so contributors had to read the whole of `log_setup.py` to learn how records flow and how the optional pieces fit.

## Changes

- `docs/architecture.md` covers the package layout and public API, the life of a log record (levels, per-handler filters, formatters, handlers), context layering and why it uses `contextvars`, environment configuration, the queue path, redaction, optional dependencies and the python-json-logger version differences, typing and packaging, testing, and how to extend the package.
- Four Mermaid diagrams (a flowchart each for layout, record flow and context, and a sequence diagram for the queue path), with no semicolons in labels. All four were rendered with `mermaid-cli` to check that they parse.
- Linked from the README.
- Tests keep the document linked, free of semicolons in diagrams, in step with `pylogkit.__all__` and free of broken relative links.

## Verification

- `pytest`: 148 passed (latest dependencies) and 126 passed with 22 skipped (no extras). `ruff` and `mypy --strict` are clean.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U2nYHVGDdthQpcwNBPbp8r
@markbac
markbac merged commit dd92762 into main Oct 3, 2026
9 checks passed
@markbac
markbac deleted the docs/56-architecture branch October 19, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add architecture documentation

2 participants