pub fn init_named(module_name: &'static str)
Examples found in repository?
examples/long_running_app.rs (line 6)
4fn main() {
5 // for this example we need to use init_named as the example name does not match the packagge name from env!
6 zarthus_env_logger::init_named("long_running_app::app");
7
8 app::run();
9}
More examples
Hide additional examples
examples/simple_init.rs (line 6)
4fn main() {
5 // for this example we need to use init_named as the example name does not match the packagge name from env!
6 zarthus_env_logger::init_named("simple_init");
7
8 trace!("Trace log!");
9 debug!("Debug log!");
10 info!("Info log!");
11 warn!("Warning log!");
12 error!("Error log!");
13}
examples/modular_init.rs (line 8)
6fn main() {
7 // for this example we need to use init_named as the example name does not match the packagge name from env!
8 zarthus_env_logger::init_named("modular_init");
9
10 debug!("root level debug");
11 example::call_log_funcs();
12 std::thread::sleep(Duration::new(1, 0));
13 error!("root level error");
14}