Skip to content

Add context, stdlib handler & rate-limit plugin - #11

Merged
nikhilvdev merged 2 commits into
mainfrom
feat/phase-7-context-stdlib-bridge
Sep 4, 2026
Merged

Add context, stdlib handler & rate-limit plugin#11
nikhilvdev merged 2 commits into
mainfrom
feat/phase-7-context-stdlib-bridge

Conversation

@nikhilvdev

Copy link
Copy Markdown
Owner

Introduce context propagation and exception formatting plus a stdlib logging bridge and a rate-limiting plugin. Adds logquill/context.py (bind_context, current_context), logquill/exceptions.py (format_exc_info), logquill/handler.py (LogQuillHandler), and logquill/plugins/rate_limit_plugin.py. Logger integrates bound context and exc_info handling; init exports updated. README and CHANGELOG updated to document features. Tests added for context, exceptions, handler, and the RateLimitPlugin.

Summary

Checklist

  • ruff check . passes
  • mypy logquill passes (--strict on the public API)
  • pytest passes, and new surface area has test coverage
  • Public API additions are documented in README.md with a runnable example
  • CHANGELOG.md has an entry under Unreleased
  • If this touches the cross-language contract (levels, logger methods,
    record shape, transport/plugin contracts, config shape) shared with
    logquill-js, a matching tracking issue/PR is opened there

Scope

Introduce context propagation and exception formatting plus a stdlib logging bridge and a rate-limiting plugin. Adds logquill/context.py (bind_context, current_context), logquill/exceptions.py (format_exc_info), logquill/handler.py (LogQuillHandler), and logquill/plugins/rate_limit_plugin.py. Logger integrates bound context and exc_info handling; __init__ exports updated. README and CHANGELOG updated to document features. Tests added for context, exceptions, handler, and the RateLimitPlugin.
Add `from __future__ import annotations` to the affected test modules so annotations are deferred and forward-referenced types remain compatible with stricter type checking. This is a no-op for runtime behavior, but keeps the tests aligned with modern Python typing expectations.
@nikhilvdev
nikhilvdev merged commit edb5a81 into main Sep 4, 2026
6 checks passed
@nikhilvdev
nikhilvdev deleted the feat/phase-7-context-stdlib-bridge branch September 4, 2026 16:30
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.

1 participant