-
Notifications
You must be signed in to change notification settings - Fork 31
Add set_log_verbosity function #56
Comments
Could the levels be enums and not integers? There was also discussion about using |
I think If we're designing an easy wrapper around "the logging implementation", we shouldn't be afraid to use fn set_up_logger(
default: ::log::LevelFilter,
overrides: &[(&str, ::log::LevelFilter)],
) -> Result<()> |
👍
FTR, originally, the function was about turning "number of I'm still unsure of what kind of API to expose (cf. #51 (comment)) |
I'm thinking if no -v flags are given then we use the environment,
otherwise we do the current behavior.
|
#51 adds a hidden
set_log_verbosity
function which is currently an implementation detail of themain!
macro. However, I would like to break it out into a general enough function that could be used outside ofmain!
.This comment proposed the following API
lowest
is the lowest log level, i.e. set to1
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!
The text was updated successfully, but these errors were encountered: