Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Add set_log_verbosity function #56

@vitiral

Description

@vitiral

#51 adds a hidden set_log_verbosity function which is currently an implementation detail of the main! macro. However, I would like to break it out into a general enough function that could be used outside of main!.

This comment proposed the following API

fn set_log_verbosity(lowest: u64, levels: &[(&str, u64)])
  • lowest is the lowest log level, i.e. set to 1 to enable all warnings.
  • levels is a tuple containing the custom levels for specific crates.

This gives complete flexibility but is also very simple.

Discuss!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions