From 458e3a14b353a3e8c6f6dd0260f558d50e2e67b5 Mon Sep 17 00:00:00 2001 From: Nanaloveyuki Date: Sun, 14 Jun 2026 11:13:07 +0800 Subject: [PATCH] :memo: clarify logger info helper routing --- docs/api/logger-info.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/api/logger-info.md b/docs/api/logger-info.md index b6c5de1..4e3e68c 100644 --- a/docs/api/logger-info.md +++ b/docs/api/logger-info.md @@ -37,7 +37,7 @@ Detailed rules explaining key parameters and behaviors - This helper delegates to `log(Level::Info, ...)`. - `Info` is the default minimum logger threshold unless changed explicitly. -- Per-call target override is not exposed here; use `log(...)` if needed. +- This helper does not accept a per-call target override. It uses the logger's stored target unless the logger was derived earlier with `with_target(...)` or `child(...)`. - Context fields, filters, patches, and queue wrappers behave exactly as they do for other write methods. ### How to Use @@ -62,6 +62,10 @@ logger.info("request completed", fields=[field("status", "200")]) In this example, the event remains concise while still carrying useful fields. +And any shared context already carried by the logger still participates through the sink pipeline. + +The write still uses the logger's stored target because this shortcut does not take a one-off `target=` override. + ### Error Case e.g.: