From f2b90b44e60b8a7213e4c2e19a542996c250f0d3 Mon Sep 17 00:00:00 2001 From: Nanaloveyuki Date: Sun, 14 Jun 2026 11:08:13 +0800 Subject: [PATCH] :memo: clarify library logger error helper routing --- docs/api/library-logger-error.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/api/library-logger-error.md b/docs/api/library-logger-error.md index 1de7231..8c804fd 100644 --- a/docs/api/library-logger-error.md +++ b/docs/api/library-logger-error.md @@ -41,7 +41,7 @@ Detailed rules explaining key parameters and behaviors - This helper delegates to `error(...)` on the wrapped logger, which in turn uses `log(Level::Error, ...)`. - `Error` is the highest built-in severity in this sync facade API. -- Per-call target override is not exposed here; use `log(...)` when explicit target control is required. +- 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(...)`. - Sink composition, filtering, patching, and queue wrappers still apply normally. - Broader composition helpers remain on the underlying `Logger[S]` and require `to_logger()` first. @@ -69,6 +69,8 @@ In this example, the record carries machine-readable context without dropping to And any shared context already carried by the facade still participates through the wrapped logger pipeline. +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.: