Skip to main content

set_log_vmodule

Function set_log_vmodule 

Source
pub fn set_log_vmodule(pattern: &str) -> Result<(), String>
Available on crate feature std only.
Expand description

Sets module-specific log levels using a pattern string.

Pattern format follows the RUST_LOG environment variable syntax:

  • module1=level1,module2=level2
  • Example: reth::sync=debug,reth::net=trace
  • Example: info,reth::stages=debug

The default directives that suppress noisy dependencies are kept, as they are at startup. An empty string restores each layer’s initial filter.

Updates all reloadable layers (stdout, file, etc.).

Returns an error if no log handle is installed or if parsing fails.