📝 clarify library async warn helper routing

This commit is contained in:
Nanaloveyuki
2026-06-14 11:02:51 +08:00
parent 2bb9b20aa4
commit e5140181ba
+3
View File
@@ -41,6 +41,7 @@ Detailed rules explaining key parameters and behaviors
- This helper delegates to `warn(...)` on the wrapped async logger, which in turn uses `log(Level::Warn, ...)`.
- The record is still subject to min-level gating, stored shared context fields, patching, filtering, and overflow policy.
- This helper does not accept a per-call target override. It uses the facade's stored target unless the facade was derived earlier with `with_target(...)` or `child(...)`.
- Warning records are useful for degraded but non-fatal runtime conditions.
- Use this helper when a named warning call is clearer than a raw `log(...)` call.
- Async state helpers remain on the underlying `AsyncLogger[S]` and require `to_async_logger()` first.
@@ -72,6 +73,8 @@ In this example, the warning carries structured operational detail.
And any shared context fields already stored on the facade are still prepended before these per-call fields.
And the write still uses the facade's stored target because this shortcut does not take a one-off `target=` override.
### Error Case
e.g.: