diff --git a/sn_logging/src/layers.rs b/sn_logging/src/layers.rs index e5ef0f359c..b10e3cec51 100644 --- a/sn_logging/src/layers.rs +++ b/sn_logging/src/layers.rs @@ -41,10 +41,10 @@ pub struct ReloadHandle(pub(crate) Handle + Send + Sync impl ReloadHandle { /// Modify the log level to the provided CSV value - /// Example input: `libp2p=DEBUG, tokio=INFO, all, sn_client=ERROR` - /// If any custom keyword is encountered in the CSV, for e.g., VERBOSE_SN_LOGS ('all'), then they will override some - /// of the value that you might have provided, `sn_client=ERROR` in the above example will be ignored and - /// instead will be set to `TRACE` since `all` keyword is provided. + /// Example input: `libp2p=DEBUG,tokio=INFO,all,sn_client=ERROR` + /// + /// Custom keywords will take less precedence if the same target has been manually specified in the CSV. + /// `sn_client=ERROR` in the above example will be used instead of the TRACE level set by "all" keyword. pub fn modify_log_level(&self, logging_value: &str) -> Result<()> { let targets: Vec<(String, Level)> = get_logging_targets(logging_value)?; self.0.modify(|old_filter| { diff --git a/sn_node_rpc_client/src/main.rs b/sn_node_rpc_client/src/main.rs index 4450c50b8a..86cd18347d 100644 --- a/sn_node_rpc_client/src/main.rs +++ b/sn_node_rpc_client/src/main.rs @@ -69,9 +69,10 @@ enum Cmd { /// Update the node's log levels. #[clap(name = "log")] Log { - /// Change the log level of the safenode. + /// Change the log level of the safenode. This accepts a comma-separated list of log levels for different modules + /// or specific keywords like "all" or "v". /// - /// Example: --level SN_LOG=all,RUST_LOG=libp2p=debug + /// Example: --level libp2p=DEBUG,tokio=INFO,all,sn_client=ERROR #[clap(name = "level", long)] log_level: String, },