logust 0.3.0__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. {logust-0.3.0 → logust-0.3.2}/.github/release-drafter.yml +2 -24
  2. {logust-0.3.0 → logust-0.3.2}/.github/workflows/CI.yml +12 -12
  3. {logust-0.3.0 → logust-0.3.2}/.github/workflows/docs.yml +1 -1
  4. {logust-0.3.0 → logust-0.3.2}/.github/workflows/freethreaded-release.yml +5 -5
  5. {logust-0.3.0 → logust-0.3.2}/.github/workflows/test.yml +3 -3
  6. {logust-0.3.0 → logust-0.3.2}/CHANGELOG.md +26 -1
  7. {logust-0.3.0 → logust-0.3.2}/Cargo.lock +57 -17
  8. {logust-0.3.0 → logust-0.3.2}/Cargo.toml +5 -1
  9. {logust-0.3.0 → logust-0.3.2}/PKG-INFO +5 -1
  10. {logust-0.3.0 → logust-0.3.2}/SECURITY.md +3 -2
  11. {logust-0.3.0 → logust-0.3.2}/docs/getting-started/installation.md +18 -0
  12. {logust-0.3.0 → logust-0.3.2}/logust/__init__.py +2 -2
  13. {logust-0.3.0 → logust-0.3.2}/logust/_logger.py +190 -27
  14. {logust-0.3.0 → logust-0.3.2}/logust/contrib/starlette.py +49 -13
  15. {logust-0.3.0 → logust-0.3.2}/pyproject.toml +6 -0
  16. {logust-0.3.0 → logust-0.3.2}/renovate.json +11 -4
  17. {logust-0.3.0 → logust-0.3.2}/src/level.rs +17 -2
  18. {logust-0.3.0 → logust-0.3.2}/src/lib.rs +17 -2
  19. logust-0.3.2/src/sink.rs +1732 -0
  20. {logust-0.3.0 → logust-0.3.2}/tests/test_configure.py +13 -5
  21. {logust-0.3.0 → logust-0.3.2}/tests/test_context.py +86 -10
  22. {logust-0.3.0 → logust-0.3.2}/tests/test_handlers.py +14 -0
  23. logust-0.3.2/tests/test_kwargs_extra.py +249 -0
  24. logust-0.3.2/tests/test_multiprocessing.py +743 -0
  25. logust-0.3.2/tests/test_starlette_middleware.py +128 -0
  26. logust-0.3.2/tests/test_starlette_security.py +116 -0
  27. logust-0.3.0/src/sink.rs +0 -545
  28. {logust-0.3.0 → logust-0.3.2}/.github/CODEOWNERS +0 -0
  29. {logust-0.3.0 → logust-0.3.2}/.github/FUNDING.yml +0 -0
  30. {logust-0.3.0 → logust-0.3.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  31. {logust-0.3.0 → logust-0.3.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  32. {logust-0.3.0 → logust-0.3.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  33. {logust-0.3.0 → logust-0.3.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  34. {logust-0.3.0 → logust-0.3.2}/.github/workflows/release-drafter.yml +0 -0
  35. {logust-0.3.0 → logust-0.3.2}/.github/workflows/security.yml +0 -0
  36. {logust-0.3.0 → logust-0.3.2}/.gitignore +0 -0
  37. {logust-0.3.0 → logust-0.3.2}/CODE_OF_CONDUCT.md +0 -0
  38. {logust-0.3.0 → logust-0.3.2}/CONTRIBUTING.md +0 -0
  39. {logust-0.3.0 → logust-0.3.2}/LICENSE +0 -0
  40. {logust-0.3.0 → logust-0.3.2}/README.md +0 -0
  41. {logust-0.3.0 → logust-0.3.2}/benchmarks/README.md +0 -0
  42. {logust-0.3.0 → logust-0.3.2}/benchmarks/__init__.py +0 -0
  43. {logust-0.3.0 → logust-0.3.2}/benchmarks/bench_filter_mixed.py +0 -0
  44. {logust-0.3.0 → logust-0.3.2}/benchmarks/bench_format_record.py +0 -0
  45. {logust-0.3.0 → logust-0.3.2}/benchmarks/bench_lazy_is_level.py +0 -0
  46. {logust-0.3.0 → logust-0.3.2}/benchmarks/bench_throughput.py +0 -0
  47. {logust-0.3.0 → logust-0.3.2}/benchmarks/conftest.py +0 -0
  48. {logust-0.3.0 → logust-0.3.2}/docs/api.md +0 -0
  49. {logust-0.3.0 → logust-0.3.2}/docs/assets/favicon.svg +0 -0
  50. {logust-0.3.0 → logust-0.3.2}/docs/assets/logo.svg +0 -0
  51. {logust-0.3.0 → logust-0.3.2}/docs/comparison.md +0 -0
  52. {logust-0.3.0 → logust-0.3.2}/docs/getting-started/quick-start.md +0 -0
  53. {logust-0.3.0 → logust-0.3.2}/docs/guide/context.md +0 -0
  54. {logust-0.3.0 → logust-0.3.2}/docs/guide/exceptions.md +0 -0
  55. {logust-0.3.0 → logust-0.3.2}/docs/guide/file-output.md +0 -0
  56. {logust-0.3.0 → logust-0.3.2}/docs/guide/formatting.md +0 -0
  57. {logust-0.3.0 → logust-0.3.2}/docs/guide/integrations.md +0 -0
  58. {logust-0.3.0 → logust-0.3.2}/docs/guide/levels.md +0 -0
  59. {logust-0.3.0 → logust-0.3.2}/docs/index.md +0 -0
  60. {logust-0.3.0 → logust-0.3.2}/docs/stylesheets/extra.css +0 -0
  61. {logust-0.3.0 → logust-0.3.2}/examples/01_basic_logging.py +0 -0
  62. {logust-0.3.0 → logust-0.3.2}/examples/02_file_output.py +0 -0
  63. {logust-0.3.0 → logust-0.3.2}/examples/03_json_serialization.py +0 -0
  64. {logust-0.3.0 → logust-0.3.2}/examples/04_context_binding.py +0 -0
  65. {logust-0.3.0 → logust-0.3.2}/examples/05_exception_handling.py +0 -0
  66. {logust-0.3.0 → logust-0.3.2}/examples/06_custom_levels.py +0 -0
  67. {logust-0.3.0 → logust-0.3.2}/examples/07_callbacks.py +0 -0
  68. {logust-0.3.0 → logust-0.3.2}/examples/08_fastapi_integration.py +0 -0
  69. {logust-0.3.0 → logust-0.3.2}/logust/_logust.pyi +0 -0
  70. {logust-0.3.0 → logust-0.3.2}/logust/_opt.py +0 -0
  71. {logust-0.3.0 → logust-0.3.2}/logust/_parse.py +0 -0
  72. {logust-0.3.0 → logust-0.3.2}/logust/_template.py +0 -0
  73. {logust-0.3.0 → logust-0.3.2}/logust/_traceback.py +0 -0
  74. {logust-0.3.0 → logust-0.3.2}/logust/_types.py +0 -0
  75. {logust-0.3.0 → logust-0.3.2}/logust/contrib/__init__.py +0 -0
  76. {logust-0.3.0 → logust-0.3.2}/logust/contrib/decorators.py +0 -0
  77. {logust-0.3.0 → logust-0.3.2}/logust/contrib/logging_handler.py +0 -0
  78. {logust-0.3.0 → logust-0.3.2}/logust/py.typed +0 -0
  79. {logust-0.3.0 → logust-0.3.2}/mkdocs.yml +0 -0
  80. {logust-0.3.0 → logust-0.3.2}/prek.toml +0 -0
  81. {logust-0.3.0 → logust-0.3.2}/src/format.rs +0 -0
  82. {logust-0.3.0 → logust-0.3.2}/src/handler.rs +0 -0
  83. {logust-0.3.0 → logust-0.3.2}/tests/__init__.py +0 -0
  84. {logust-0.3.0 → logust-0.3.2}/tests/conftest.py +0 -0
  85. {logust-0.3.0 → logust-0.3.2}/tests/test_callable_sink.py +0 -0
  86. {logust-0.3.0 → logust-0.3.2}/tests/test_callable_template.py +0 -0
  87. {logust-0.3.0 → logust-0.3.2}/tests/test_callbacks.py +0 -0
  88. {logust-0.3.0 → logust-0.3.2}/tests/test_caller_info.py +0 -0
  89. {logust-0.3.0 → logust-0.3.2}/tests/test_collect_options.py +0 -0
  90. {logust-0.3.0 → logust-0.3.2}/tests/test_filter_fast_path.py +0 -0
  91. {logust-0.3.0 → logust-0.3.2}/tests/test_format_optimization.py +0 -0
  92. {logust-0.3.0 → logust-0.3.2}/tests/test_format_tokens.py +0 -0
  93. {logust-0.3.0 → logust-0.3.2}/tests/test_levels.py +0 -0
  94. {logust-0.3.0 → logust-0.3.2}/tests/test_logger.py +0 -0
  95. {logust-0.3.0 → logust-0.3.2}/tests/test_opt.py +0 -0
  96. {logust-0.3.0 → logust-0.3.2}/tests/test_parsing.py +0 -0
  97. {logust-0.3.0 → logust-0.3.2}/tests/test_token_registry.py +0 -0
@@ -1,5 +1,5 @@
1
- name-template: 'Logust v$RESOLVED_VERSION ✨'
2
- tag-template: 'v$RESOLVED_VERSION'
1
+ name-template: 'Logust — Draft Changelog'
2
+ tag-template: ''
3
3
  categories:
4
4
  - title: '🚀 Core & Features'
5
5
  labels:
@@ -29,28 +29,6 @@ categories:
29
29
  - 'deps'
30
30
  change-template: '- $TITLE (by @$AUTHOR) #$NUMBER'
31
31
  change-title-escapes: '\<*_&'
32
- version-resolver:
33
- major:
34
- labels:
35
- - 'major'
36
- - 'breaking-change'
37
- minor:
38
- labels:
39
- - 'minor'
40
- - 'feature'
41
- - 'enhancement'
42
- patch:
43
- labels:
44
- - 'patch'
45
- - 'fix'
46
- - 'bugfix'
47
- - 'bug'
48
- - 'chore'
49
- - 'documentation'
50
- - 'ci'
51
- - 'testing'
52
- - 'dependencies'
53
- default: patch
54
32
  template: |
55
33
  ## What's New
56
34
 
@@ -36,7 +36,7 @@ jobs:
36
36
  - uses: actions/checkout@v6
37
37
  - uses: actions/setup-python@v6
38
38
  with:
39
- python-version: '3.10'
39
+ python-version: '3.14'
40
40
  - name: Build wheels
41
41
  uses: PyO3/maturin-action@v1
42
42
  with:
@@ -45,7 +45,7 @@ jobs:
45
45
  sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
46
46
  manylinux: auto
47
47
  - name: Upload wheels
48
- uses: actions/upload-artifact@v6
48
+ uses: actions/upload-artifact@v7
49
49
  with:
50
50
  name: wheels-linux-${{ matrix.platform.target }}
51
51
  path: dist
@@ -67,7 +67,7 @@ jobs:
67
67
  - uses: actions/checkout@v6
68
68
  - uses: actions/setup-python@v6
69
69
  with:
70
- python-version: '3.10'
70
+ python-version: '3.14'
71
71
  - name: Build wheels
72
72
  uses: PyO3/maturin-action@v1
73
73
  with:
@@ -76,7 +76,7 @@ jobs:
76
76
  sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
77
77
  manylinux: musllinux_1_2
78
78
  - name: Upload wheels
79
- uses: actions/upload-artifact@v6
79
+ uses: actions/upload-artifact@v7
80
80
  with:
81
81
  name: wheels-musllinux-${{ matrix.platform.target }}
82
82
  path: dist
@@ -99,7 +99,7 @@ jobs:
99
99
  - uses: actions/checkout@v6
100
100
  - uses: actions/setup-python@v6
101
101
  with:
102
- python-version: '3.13'
102
+ python-version: '3.14'
103
103
  architecture: ${{ matrix.platform.python_arch }}
104
104
  - name: Build wheels
105
105
  uses: PyO3/maturin-action@v1
@@ -108,7 +108,7 @@ jobs:
108
108
  args: --release --out dist --find-interpreter
109
109
  sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
110
110
  - name: Upload wheels
111
- uses: actions/upload-artifact@v6
111
+ uses: actions/upload-artifact@v7
112
112
  with:
113
113
  name: wheels-windows-${{ matrix.platform.target }}
114
114
  path: dist
@@ -126,7 +126,7 @@ jobs:
126
126
  - uses: actions/checkout@v6
127
127
  - uses: actions/setup-python@v6
128
128
  with:
129
- python-version: '3.10'
129
+ python-version: '3.14'
130
130
  - name: Build wheels
131
131
  uses: PyO3/maturin-action@v1
132
132
  with:
@@ -134,7 +134,7 @@ jobs:
134
134
  args: --release --out dist --find-interpreter
135
135
  sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
136
136
  - name: Upload wheels
137
- uses: actions/upload-artifact@v6
137
+ uses: actions/upload-artifact@v7
138
138
  with:
139
139
  name: wheels-macos-${{ matrix.platform.target }}
140
140
  path: dist
@@ -149,7 +149,7 @@ jobs:
149
149
  command: sdist
150
150
  args: --out dist
151
151
  - name: Upload sdist
152
- uses: actions/upload-artifact@v6
152
+ uses: actions/upload-artifact@v7
153
153
  with:
154
154
  name: wheels-sdist
155
155
  path: dist
@@ -165,14 +165,14 @@ jobs:
165
165
  contents: write
166
166
  attestations: write
167
167
  steps:
168
- - uses: actions/download-artifact@v7
168
+ - uses: actions/download-artifact@v8
169
169
  - name: Generate artifact attestation
170
- uses: actions/attest-build-provenance@v3
170
+ uses: actions/attest-build-provenance@v4
171
171
  with:
172
172
  subject-path: 'wheels-*/*'
173
173
  - name: Install uv
174
174
  if: ${{ startsWith(github.ref, 'refs/tags/') }}
175
- uses: astral-sh/setup-uv@v7
175
+ uses: astral-sh/setup-uv@v8.1.0
176
176
  - name: Publish to PyPI
177
177
  if: ${{ startsWith(github.ref, 'refs/tags/') }}
178
178
  run: uv publish --trusted-publishing always --check-url https://pypi.org/simple/ 'wheels-*/*'
@@ -27,7 +27,7 @@ jobs:
27
27
  - name: Set up Python
28
28
  uses: actions/setup-python@v6
29
29
  with:
30
- python-version: '3.12'
30
+ python-version: '3.14'
31
31
 
32
32
  - name: Cache pip
33
33
  uses: actions/cache@v5
@@ -32,7 +32,7 @@ jobs:
32
32
  sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
33
33
  manylinux: 2_28
34
34
  - name: Upload wheels
35
- uses: actions/upload-artifact@v6
35
+ uses: actions/upload-artifact@v7
36
36
  with:
37
37
  name: wheels-linux-freethreaded-${{ matrix.platform.target }}-${{ matrix.python-version }}
38
38
  path: dist
@@ -61,7 +61,7 @@ jobs:
61
61
  args: --release --out dist --interpreter python
62
62
  sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
63
63
  - name: Upload wheels
64
- uses: actions/upload-artifact@v6
64
+ uses: actions/upload-artifact@v7
65
65
  with:
66
66
  name: wheels-macos-freethreaded-${{ matrix.platform.target }}-${{ matrix.python-version }}
67
67
  path: dist
@@ -77,14 +77,14 @@ jobs:
77
77
  contents: read
78
78
  attestations: write
79
79
  steps:
80
- - uses: actions/download-artifact@v7
80
+ - uses: actions/download-artifact@v8
81
81
  - name: Generate artifact attestation
82
- uses: actions/attest-build-provenance@v3
82
+ uses: actions/attest-build-provenance@v4
83
83
  with:
84
84
  subject-path: 'wheels-*/*'
85
85
  - name: Install uv
86
86
  if: ${{ startsWith(github.ref, 'refs/tags/') }}
87
- uses: astral-sh/setup-uv@v7
87
+ uses: astral-sh/setup-uv@v8.1.0
88
88
  - name: Publish to PyPI
89
89
  if: ${{ startsWith(github.ref, 'refs/tags/') }}
90
90
  run: uv publish --trusted-publishing always --check-url https://pypi.org/simple/ 'wheels-*/*'
@@ -70,7 +70,7 @@ jobs:
70
70
  uses: dtolnay/rust-toolchain@stable
71
71
 
72
72
  - name: Install uv
73
- uses: astral-sh/setup-uv@v7
73
+ uses: astral-sh/setup-uv@v8.1.0
74
74
 
75
75
  - name: Install dependencies and build
76
76
  run: |
@@ -97,13 +97,13 @@ jobs:
97
97
  - name: Set up Python
98
98
  uses: actions/setup-python@v6
99
99
  with:
100
- python-version: '3.12'
100
+ python-version: '3.14'
101
101
 
102
102
  - name: Install Rust
103
103
  uses: dtolnay/rust-toolchain@stable
104
104
 
105
105
  - name: Install uv
106
- uses: astral-sh/setup-uv@v7
106
+ uses: astral-sh/setup-uv@v8.1.0
107
107
 
108
108
  - name: Install dependencies and build
109
109
  run: |
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.2] - 2026-05-07
11
+
12
+ ### Added
13
+ - **Loguru-style kwargs-to-extra in log methods**: `logger.info("user {id}", id=1, action="x")` now formats the message with `str.format` and attaches any kwargs not consumed by the message placeholders to `record["extra"]` for that call only (no persistent bind). Works on `trace` / `debug` / `info` / `success` / `warning` / `error` / `fail` / `critical` / `log` / `exception`. When the level is disabled, `message.format(**kwargs)` is skipped entirely via the existing `min_level` early-return, so disabled-level calls never trigger format work or `__format__`-side effects. Field root detection treats `{0abc}` and other non-decimal roots as keyword references. Implementation is Python-only — no Rust or `.pyi` changes — and per-call extra values are coerced to strings via the same path as `bind()`. (#25)
14
+ - **`logust.contrib.starlette` honors incoming `x-request-id` header**: `RequestLoggerMiddleware` now propagates the upstream `x-request-id` header value as the request id when present, falling back to the existing 8-char `uuid4` otherwise. Improves log correlation across reverse proxies. Visible behavior change for users behind proxies that already set the header — log ids will look different from before. (#28)
15
+ - **Optional extras `[starlette]` and `[fastapi]`**: `pip install "logust[starlette]"` / `pip install "logust[fastapi]"` install the framework alongside Logust so `logust.contrib.starlette` works without extra steps. (#29)
16
+
17
+ ### Fixed
18
+ - **Patcher pipeline runs before handlers see the record**: `Logger.patch()` previously registered a callback that was never invoked before records reached filters or sinks, so security-sensitive transforms (e.g. token redaction) were silently dropped. `_log_with_level` and the dynamic-level `log()` path now run patchers before binding extras, normalize patched-extra keys to `str` for the Rust binder, and blank removed keys (`""`) so a patcher can hide a value previously bound via `bind()` / `contextualize()`. Behavior fix: code that relied on the silent drop (unlikely) will now see patchers run. (#26)
19
+ - **Starlette middleware no longer leaks secrets via query strings or partial JSON bodies**: `query_params` was logged as a plain `dict(...)`, exposing `access_token` / `password` / etc. in cleartext. Body masking ran *after* truncation, so a request that exceeded `max_body_size` could still log the unmasked head. Query params are now masked through the same sensitive-key check as headers, multi-value params are preserved, and bodies are masked first then truncated. (#26)
20
+ - **File retention no longer deletes unrelated same-stem files**: The retention scan in `src/sink.rs` used `filename.starts_with(stem)`, so a sibling like `app.keep`, `app.log.bak`, or even `application.log` next to `app.log` was eligible for deletion. Matching is now strict: only filenames matching the generated rotation pattern `{stem}.{YYYY-MM-DD_HH-MM-SS}_{micros}.pid{N}.{ext}[.gz]` are considered. (#26)
21
+
22
+ ### Changed
23
+ - **`RequestLoggerMiddleware` rejects negative `max_body_size`**: `__init__` now raises `ValueError` when `max_body_size < 0` instead of silently producing surprising slicing behavior. (#28)
24
+
25
+ ## [0.3.1] - 2026-04-23
26
+
27
+ ### Fixed
28
+ - **`FileSink::drop` panic in forked children (`enqueue=True`)**: When a process using an `enqueue=True` file handler was forked (e.g. via `multiprocessing.Process`), the child inherited the parent's `JoinHandle` pointing at a background writer thread that does not survive `fork()`. Calling `logger.remove()` (or exit cleanup) in the child triggered `threads should not terminate unexpectedly`. `FileSink` now records its creation PID and skips the `JoinHandle::join` in non-original processes, preventing the panic. (#22)
29
+ - **Fork-safe file sinks across parent/child processes**: On Unix, `FileSink` now registers async sinks in a global registry and uses a `pthread_atfork(prepare)` hook to pause writer threads before `fork()`, avoiding macOS `libdispatch` SIGTRAP from inheriting live threads. The parent resumes its async writer on the next use; forked children downgrade an inherited `enqueue=True` backend to a fresh synchronous `BufWriter` on their first write instead of reviving the parent's thread and channel, and `mem::forget` the inherited handle/sender/buffer so no cleanup ever runs against parent-owned state. Multiple forked processes can keep appending to the same file sink, and re-forking a child no longer reintroduces the original join panic. (#22)
30
+ - **Cross-process rotation and `max_size`**: Rotation is now coordinated across processes with `flock` on a sibling `<path>.lock` file — writers take `LOCK_SH` for each write while the rotator takes `LOCK_EX`, so `rename` / `compress` / retention only run once every other process has released the old inode. Writers detect the inode change via `stat` and reopen the file on their next write, so no lines are lost when multiple processes share the sink. `max_size` also re-checks the real file size with `fs::metadata` after the atomic fast path, so size-based rotation no longer undercounts concurrent writes from other processes.
31
+ Follow-up hardening: async shutdown stops the writer by dropping the sender instead of enqueueing a blocking `Shutdown`, `pthread_atfork(prepare)` uses `try_lock` best-effort shutdown without temporary allocation, and the sink / level / logger state uses `std::sync` primitives instead of `parking_lot` to keep inherited mutex state well-defined across `fork()`.
32
+
10
33
  ## [0.3.0] - 2026-04-11
11
34
 
12
35
  ### Performance
@@ -108,7 +131,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
108
131
  - 1.3x faster than Python standard logging
109
132
  - Lock-free fast path for filtered messages
110
133
 
111
- [Unreleased]: https://github.com/yamaaaaaa31/logust/compare/v0.3.0...HEAD
134
+ [Unreleased]: https://github.com/yamaaaaaa31/logust/compare/v0.3.2...HEAD
135
+ [0.3.2]: https://github.com/yamaaaaaa31/logust/compare/v0.3.1...v0.3.2
136
+ [0.3.1]: https://github.com/yamaaaaaa31/logust/compare/v0.3.0...v0.3.1
112
137
  [0.3.0]: https://github.com/yamaaaaaa31/logust/compare/v0.2.1...v0.3.0
113
138
  [0.2.1]: https://github.com/yamaaaaaa31/logust/releases/tag/v0.2.1
114
139
  [0.2.0]: https://github.com/yamaaaaaa31/logust/releases/tag/v0.2.0
@@ -25,9 +25,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
25
25
 
26
26
  [[package]]
27
27
  name = "bitflags"
28
- version = "2.11.0"
28
+ version = "2.11.1"
29
29
  source = "registry+https://github.com/rust-lang/crates.io-index"
30
- checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
30
+ checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
31
31
 
32
32
  [[package]]
33
33
  name = "bumpalo"
@@ -37,9 +37,9 @@ checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
37
37
 
38
38
  [[package]]
39
39
  name = "cc"
40
- version = "1.2.60"
40
+ version = "1.2.61"
41
41
  source = "registry+https://github.com/rust-lang/crates.io-index"
42
- checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20"
42
+ checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d"
43
43
  dependencies = [
44
44
  "find-msvc-tools",
45
45
  "shlex",
@@ -120,6 +120,30 @@ dependencies = [
120
120
  "miniz_oxide",
121
121
  ]
122
122
 
123
+ [[package]]
124
+ name = "futures-core"
125
+ version = "0.3.32"
126
+ source = "registry+https://github.com/rust-lang/crates.io-index"
127
+ checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
128
+
129
+ [[package]]
130
+ name = "futures-task"
131
+ version = "0.3.32"
132
+ source = "registry+https://github.com/rust-lang/crates.io-index"
133
+ checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
134
+
135
+ [[package]]
136
+ name = "futures-util"
137
+ version = "0.3.32"
138
+ source = "registry+https://github.com/rust-lang/crates.io-index"
139
+ checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
140
+ dependencies = [
141
+ "futures-core",
142
+ "futures-task",
143
+ "pin-project-lite",
144
+ "slab",
145
+ ]
146
+
123
147
  [[package]]
124
148
  name = "heck"
125
149
  version = "0.5.0"
@@ -158,19 +182,21 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
158
182
 
159
183
  [[package]]
160
184
  name = "js-sys"
161
- version = "0.3.95"
185
+ version = "0.3.98"
162
186
  source = "registry+https://github.com/rust-lang/crates.io-index"
163
- checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca"
187
+ checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08"
164
188
  dependencies = [
189
+ "cfg-if",
190
+ "futures-util",
165
191
  "once_cell",
166
192
  "wasm-bindgen",
167
193
  ]
168
194
 
169
195
  [[package]]
170
196
  name = "libc"
171
- version = "0.2.184"
197
+ version = "0.2.186"
172
198
  source = "registry+https://github.com/rust-lang/crates.io-index"
173
- checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
199
+ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
174
200
 
175
201
  [[package]]
176
202
  name = "lock_api"
@@ -189,16 +215,18 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
189
215
 
190
216
  [[package]]
191
217
  name = "logust"
192
- version = "0.3.0"
218
+ version = "0.3.2"
193
219
  dependencies = [
194
220
  "chrono",
195
221
  "colored",
196
222
  "crossbeam-channel",
197
223
  "flate2",
224
+ "libc",
198
225
  "parking_lot",
199
226
  "pyo3",
200
227
  "serde",
201
228
  "serde_json",
229
+ "windows-sys",
202
230
  ]
203
231
 
204
232
  [[package]]
@@ -255,6 +283,12 @@ dependencies = [
255
283
  "windows-link",
256
284
  ]
257
285
 
286
+ [[package]]
287
+ name = "pin-project-lite"
288
+ version = "0.2.17"
289
+ source = "registry+https://github.com/rust-lang/crates.io-index"
290
+ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
291
+
258
292
  [[package]]
259
293
  name = "portable-atomic"
260
294
  version = "1.13.1"
@@ -413,6 +447,12 @@ version = "0.3.9"
413
447
  source = "registry+https://github.com/rust-lang/crates.io-index"
414
448
  checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
415
449
 
450
+ [[package]]
451
+ name = "slab"
452
+ version = "0.4.12"
453
+ source = "registry+https://github.com/rust-lang/crates.io-index"
454
+ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
455
+
416
456
  [[package]]
417
457
  name = "smallvec"
418
458
  version = "1.15.1"
@@ -444,9 +484,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
444
484
 
445
485
  [[package]]
446
486
  name = "wasm-bindgen"
447
- version = "0.2.118"
487
+ version = "0.2.121"
448
488
  source = "registry+https://github.com/rust-lang/crates.io-index"
449
- checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89"
489
+ checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790"
450
490
  dependencies = [
451
491
  "cfg-if",
452
492
  "once_cell",
@@ -457,9 +497,9 @@ dependencies = [
457
497
 
458
498
  [[package]]
459
499
  name = "wasm-bindgen-macro"
460
- version = "0.2.118"
500
+ version = "0.2.121"
461
501
  source = "registry+https://github.com/rust-lang/crates.io-index"
462
- checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed"
502
+ checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578"
463
503
  dependencies = [
464
504
  "quote",
465
505
  "wasm-bindgen-macro-support",
@@ -467,9 +507,9 @@ dependencies = [
467
507
 
468
508
  [[package]]
469
509
  name = "wasm-bindgen-macro-support"
470
- version = "0.2.118"
510
+ version = "0.2.121"
471
511
  source = "registry+https://github.com/rust-lang/crates.io-index"
472
- checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904"
512
+ checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2"
473
513
  dependencies = [
474
514
  "bumpalo",
475
515
  "proc-macro2",
@@ -480,9 +520,9 @@ dependencies = [
480
520
 
481
521
  [[package]]
482
522
  name = "wasm-bindgen-shared"
483
- version = "0.2.118"
523
+ version = "0.2.121"
484
524
  source = "registry+https://github.com/rust-lang/crates.io-index"
485
- checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129"
525
+ checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441"
486
526
  dependencies = [
487
527
  "unicode-ident",
488
528
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "logust"
3
- version = "0.3.0"
3
+ version = "0.3.2"
4
4
  edition = "2024"
5
5
  readme = "README.md"
6
6
 
@@ -15,5 +15,9 @@ colored = "3.0"
15
15
  flate2 = "1.0"
16
16
  parking_lot = "0.12"
17
17
  crossbeam-channel = "0.5"
18
+ libc = "0.2"
18
19
  serde = { version = "1.0", features = ["derive"] }
19
20
  serde_json = "1.0"
21
+
22
+ [target.'cfg(windows)'.dependencies]
23
+ windows-sys = { version = "0.61", features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_IO"] }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: logust
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -23,11 +23,15 @@ Requires-Dist: ruff>=0.8 ; extra == 'dev'
23
23
  Requires-Dist: mkdocs-material>=9.5 ; extra == 'docs'
24
24
  Requires-Dist: mkdocstrings[python]>=0.24 ; extra == 'docs'
25
25
  Requires-Dist: mkdocs-minify-plugin>=0.8 ; extra == 'docs'
26
+ Requires-Dist: fastapi>=0.100 ; extra == 'fastapi'
27
+ Requires-Dist: starlette>=0.27 ; extra == 'starlette'
26
28
  Requires-Dist: pytest>=8.0 ; extra == 'test'
27
29
  Requires-Dist: pytest-cov>=4.0 ; extra == 'test'
28
30
  Provides-Extra: bench
29
31
  Provides-Extra: dev
30
32
  Provides-Extra: docs
33
+ Provides-Extra: fastapi
34
+ Provides-Extra: starlette
31
35
  Provides-Extra: test
32
36
  License-File: LICENSE
33
37
  Summary: A fast, Rust-powered Python logging library with free-threaded support, inspired by loguru
@@ -4,7 +4,8 @@
4
4
 
5
5
  | Version | Supported |
6
6
  | ------- | ------------------ |
7
- | 0.1.x | :white_check_mark: |
7
+ | 0.3.x | :white_check_mark: |
8
+ | < 0.3 | :x: |
8
9
 
9
10
  ## Reporting a Vulnerability
10
11
 
@@ -102,7 +103,7 @@ We monitor for security advisories in our dependencies and update promptly when
102
103
 
103
104
  ## Security Updates
104
105
 
105
- Security updates will be released as patch versions (e.g., 0.1.1, 0.1.2) and announced via:
106
+ Security updates will be released as patch versions (e.g., 0.3.2, 0.3.3) and announced via:
106
107
 
107
108
  - GitHub Security Advisories
108
109
  - Release notes
@@ -35,6 +35,24 @@ Get Logust from PyPI in seconds, or build from source for local Rust changes.
35
35
  Source builds require Rust stable and a working cargo toolchain.
36
36
  On Windows, activate with `.venv\\Scripts\\activate`.
37
37
 
38
+ ## Optional extras
39
+
40
+ Install web framework integrations on demand:
41
+
42
+ === "Starlette"
43
+ ```bash
44
+ pip install "logust[starlette]"
45
+ ```
46
+
47
+ === "FastAPI"
48
+ ```bash
49
+ pip install "logust[fastapi]"
50
+ ```
51
+
52
+ These extras install the web framework alongside Logust so
53
+ `logust.contrib.starlette` and the `RequestLoggerMiddleware` work out of the
54
+ box.
55
+
38
56
  ## Verify
39
57
 
40
58
  ```bash
@@ -1,6 +1,6 @@
1
1
  """Logust - A fast, Rust-powered Python logging library inspired by loguru.
2
2
 
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
 
5
5
  Usage:
6
6
  >>> import logust
@@ -78,7 +78,7 @@ if TYPE_CHECKING:
78
78
  def critical(message: str, *, exception: str | None = None, **kwargs: Any) -> None: ...
79
79
 
80
80
 
81
- __version__ = "0.3.0"
81
+ __version__ = "0.3.2"
82
82
 
83
83
  logger = Logger(_rust_logger)
84
84