From 870ec3357462ac383f9e75c8ef10569d8d221dca Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 12 Jul 2024 10:51:07 +0200 Subject: [PATCH] log: documentation fixup The scope and sync_scope methods simply activate the context, they don't affect the counter, the counter is initialized when creating the context with LogContext::new(). Signed-off-by: Wolfgang Bumiller --- proxmox-log/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-log/src/lib.rs b/proxmox-log/src/lib.rs index 26c60f25..f4f24e0c 100644 --- a/proxmox-log/src/lib.rs +++ b/proxmox-log/src/lib.rs @@ -105,7 +105,7 @@ impl LogContext { LOG_CONTEXT.try_with(|ctx| ctx.clone()).ok() } - /// Run a task with a new logger and an initial warn counter of zero. + /// Run a task with this log context. pub fn sync_scope(self, func: F) -> R where F: FnOnce() -> R, @@ -113,7 +113,7 @@ impl LogContext { LOG_CONTEXT.sync_scope(self, func) } - /// Run a task with a new logger and an initial warn counter of zero. + /// Run a task with this log context. pub fn scope(self, f: F) -> TaskLocalFuture where F: Future,