Skip to content

There are no examples of how to set log level per module #219

@wlinna

Description

@wlinna

I have been fighting and trying to figure out how to do something like this with logforth:

    simple_logger::SimpleLogger::new()
        .with_module_level("geo", lib::log::LevelFilter::Warn)
        .with_module_level("rerun", lib::log::LevelFilter::Warn)
        .with_module_level("re_chunk", lib::log::LevelFilter::Warn)
        .with_module_level("re_log", lib::log::LevelFilter::Warn)
        .with_module_level("re_log_encoding", lib::log::LevelFilter::Warn)
        .with_module_level("re_sdk", lib::log::LevelFilter::Warn)
        .with_module_level("re_sorbet", lib::log::LevelFilter::Warn)
        .with_module_level("tracing", lib::log::LevelFilter::Warn)
        .init()
       .unwrap();

I went through all the examples, but none of them show how to do this.

Eventually I found EnvFilter, but even that doesn't have examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions