mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-24 00:42:18 +00:00
📝 refine async snapshot docs
This commit is contained in:
@@ -38,6 +38,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
- This helper is equivalent to `AsyncLoggerState::new(async_runtime_state(), self.pending_count(), self.dropped_count(), self.is_closed(), self.is_running(), self.has_failed(), self.last_error(), self.flush_policy())`.
|
||||
- `async_logger_state_to_json(...)` and `stringify_async_logger_state(...)` convert the snapshot to stable diagnostic output.
|
||||
- `runtime` embeds the result of `async_runtime_state()` so callers do not need to join separate helpers manually.
|
||||
- Because the snapshot is assembled field by field when `state()` is called, later logger changes require calling `state()` again rather than reusing an older `AsyncLoggerState` value as if it refreshed itself.
|
||||
|
||||
### How to Use
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ Detailed rules explaining key parameters and behaviors
|
||||
- In the current backend implementations, the resulting pair is `NativeWorker + true` or `Compatibility + false`.
|
||||
- `async_runtime_state_to_json(...)` and `stringify_async_runtime_state(...)` serialize this state.
|
||||
- This API is environment-scoped and does not depend on a particular `AsyncLogger` instance.
|
||||
- The returned value is a snapshot data object, not a live runtime handle, so later backend checks require calling `async_runtime_state()` again rather than reusing an older value as if it refreshed itself.
|
||||
|
||||
### How to Use
|
||||
|
||||
|
||||
Reference in New Issue
Block a user