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 <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2024-07-12 10:51:07 +02:00
parent 64ff97d8e2
commit 870ec33574

View File

@ -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<F, R>(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<F>(self, f: F) -> TaskLocalFuture<Self, F>
where
F: Future,