mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-28 02:42:21 +00:00
📝 align async state serializer docs
This commit is contained in:
@@ -40,6 +40,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
- This helper is suitable for health endpoints, diagnostics payloads, and custom serialization flows.
|
||||
- It shares the same stable field names used by `stringify_async_logger_state(...)`.
|
||||
- The state must already have been captured or constructed before serialization.
|
||||
- Serialization preserves whatever snapshot combination it receives, including failure flags together with remaining backlog counts.
|
||||
|
||||
### How to Use
|
||||
|
||||
@@ -71,6 +72,8 @@ e.g.:
|
||||
|
||||
- If the queue is empty, `pending_count` and `dropped_count` are still serialized normally as numeric values.
|
||||
|
||||
- If `has_failed` is `true`, serialization does not force `pending_count` to `0` or clear `last_error`; it reports the snapshot exactly as provided.
|
||||
|
||||
### Notes
|
||||
|
||||
1. This helper preserves the nested runtime snapshot instead of flattening `mode` and `background_worker` onto the top level.
|
||||
|
||||
Reference in New Issue
Block a user