From 6f3aa5386f0e9f236f13667024fcc56aac975c20 Mon Sep 17 00:00:00 2001 From: Marcin S Date: Thu, 25 May 2023 12:19:15 -0400 Subject: [PATCH] Update target docs --- node/gum/src/lib.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/node/gum/src/lib.rs b/node/gum/src/lib.rs index 2faed0ba2055..c2d62d98a671 100644 --- a/node/gum/src/lib.rs +++ b/node/gum/src/lib.rs @@ -40,7 +40,7 @@ //! //! ### Log levels //! -//! All of the the [`tracing` macros](https://docs.rs/tracing/latest/tracing/index.html#macros) log level macros are available. +//! All of the the [`tracing` macros](https://docs.rs/tracing/latest/tracing/index.html#macros) are available. //! In decreasing order of priority they are: //! //! - `error!` @@ -54,11 +54,14 @@ //! The `LOG_TARGET` should be defined once per crate, e.g.: //! //! ```rs -//! const LOG_TARGET: &str = "parachain::pvf::prepare-worker"; +//! const LOG_TARGET: &str = "parachain::pvf"; //! ``` //! -//! The target can be an arbitrary string, but we use the `::` syntax to mimic -//! Rust's module separators. +//! This should be of the form `::`, where the `::` is optional. +//! +//! The target and subtarget are used when debugging by specializing the Grafana Loki query to +//! filter specific subsystem logs. The more specific the query is the better when approaching the +//! query response limit. //! //! ### Fields //! @@ -99,7 +102,7 @@ //! ``` //! //! On the other hand if you want all `parachain` logs, specify `parachain=trace`, which will also -//! include logs from `parachain::pvf` and other sub-modules. +//! include logs from `parachain::pvf` and other subtargets. pub use tracing::{enabled, event, Level};