mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-24 00:42:18 +00:00
📝 sharpen closed async log docs
This commit is contained in:
@@ -38,7 +38,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
- A closed logger should no longer be treated as a normal active enqueue target.
|
||||
- This helper is only a direct read of the current `is_closed` ref; it does not wait for drain completion or clear any other state.
|
||||
- This helper reflects lifecycle state only and does not indicate whether the worker is still draining.
|
||||
- Exact post-close logging behavior is runtime-dependent, so `is_closed()` should be read as a lifecycle signal rather than a full enqueue-policy contract.
|
||||
- Exact post-close logging behavior is runtime-dependent: compatibility runtimes can short-circuit before patch and enqueue work, while native-worker runtimes may still build and patch a record before the closed queue rejects it, so `is_closed()` should be read as a lifecycle signal rather than a full enqueue-policy contract.
|
||||
|
||||
### How to Use
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
- The logger checks `is_enabled(level)` before building a record.
|
||||
- Stored shared context fields are prepended ahead of per-call `fields`, then patch and filter logic are applied before enqueue.
|
||||
- If `target` is empty, the logger uses its current default target; otherwise the provided per-call target overrides that default for this one write.
|
||||
- The narrower library facade does not change enqueue semantics, overflow handling, or runtime-dependent closed-on-log behavior; it only limits the visible API surface.
|
||||
- The narrower library facade does not change enqueue semantics, overflow handling, or runtime-dependent closed-on-log behavior; in particular, compatibility runtimes can short-circuit before patch and enqueue work, while native-worker runtimes may still reach wrapped record construction and then treat the closed queue as a non-accepted write. The facade only limits the visible API surface.
|
||||
- Async state helpers such as `pending_count()`, `dropped_count()`, `state()`, `has_failed()`, and `last_error()` remain on the underlying `AsyncLogger[S]` and require `to_async_logger()` first.
|
||||
|
||||
### How to Use
|
||||
|
||||
Reference in New Issue
Block a user