mod foo {
        mod bar {
          pub fn run() {
            log::warn!("[bar] warn");
            log::info!("[bar] info");
            log::debug!("[bar] debug");
          }
        }
        pub fn run() {
          log::warn!("[foo] warn");
          log::info!("[foo] info");
          log::debug!("[foo] debug");
          bar::run();
        }
      }
      fn main() {
        env_logger::init();
        log::warn!("[root] warn");
        log::info!("[root] info");
        log::debug!("[root] debug");
        foo::run();
      }
      

      Rust language logo
      Enable log levels

      Codiga's Rust Recipes

      define different log levels

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.