Repository navigation
Add architecture documentation - #57
Merged
Merged
Conversation
## 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
There was no architecture documentation, so contributors had to read the whole of
log_setup.pyto learn how records flow and how the optional pieces fit.Changes
docs/architecture.mdcovers the package layout and public API, the life of a log record (levels, per-handler filters, formatters, handlers), context layering and why it usescontextvars, 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.mermaid-clito check that they parse.pylogkit.__all__and free of broken relative links.Verification
pytest: 148 passed (latest dependencies) and 126 passed with 22 skipped (no extras).ruffandmypy --strictare clean.Closes #56
🤖 Generated with Claude Code
https://claude.ai/code/session_01U2nYHVGDdthQpcwNBPbp8r
Generated by Claude Code