📝 clarify sync projection runtime helper state

This commit is contained in:
Nanaloveyuki
2026-06-14 09:15:04 +08:00
parent d94b415cb0
commit f6fc9c4201
3 changed files with 8 additions and 0 deletions
+3
View File
@@ -37,6 +37,7 @@ Detailed rules explaining key parameters and behaviors
- Sink wiring, target, min level, timestamp behavior, and attached wrappers remain the same.
- Use this when code needs full-surface APIs such as `with_timestamp(...)`, `with_filter(...)`, or `with_patch(...)`.
- When the wrapped sink is `RuntimeSink`, unwrapping preserves that runtime sink value, but the result type is still `Logger[RuntimeSink]` rather than the `ConfiguredLogger` alias. Runtime-specific operations remain available through `full.sink` or by keeping a `ConfiguredLogger` value directly.
- That same unwrap also preserves queued runtime state and file-backed helper behavior exactly as they existed behind the facade, including drain or flush results, file state snapshots, and file control methods.
### How to Use
@@ -71,6 +72,8 @@ e.g.:
- Recovering the full logger does not rebuild or reset the existing sink wrappers.
- Recovering the full logger does not translate configured runtime state into a simpler snapshot; queued counts, file availability, file failure counters, and runtime file controls stay exactly as they were on the wrapped logger.
### Notes
1. Use this only when the narrower facade is no longer sufficient.