Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upenv_logger::init_or_default("mylib=warn") #113
Conversation
dtolnay
reviewed
May 23, 2017
|
Thanks! How would you feel about accomplishing this with LogBuilder instead? let mut lb = env_logger::LogBuilder::new();
lb.parse(&env::var("RUST_LOG").unwrap_or("mylib=warn".to_owned()));
lb.init()?;I am concerned that |
This comment has been minimized.
This comment has been minimized.
|
It is inconvenient to repeat this fragment in each unit test, in each bench, in each of several main functions. Or create a library with just this function.
|
This comment has been minimized.
This comment has been minimized.
|
Seems reasonable. Could you come up with some approaches for making this compose better with other functionality, especially #146? Here is one idea to get you started: LogBuilder::new().parse("mylib=warn").parse_env().init(); |
sebasmagri
referenced this pull request
Aug 4, 2017
Closed
Remove env_logger from this repository #145
This comment has been minimized.
This comment has been minimized.
|
Thanks @stepancheg! Do you mind rebasing this over at https://github.com/sebasmagri/env_logger, which is the new home for It would be good for this to be composable within the builder. |
This comment has been minimized.
This comment has been minimized.
|
I'll go ahead and close this now, please feel free to file against the new |
stepancheg commentedMay 13, 2017
Function parameter is used as logging spec when RUST_LOG variable
is not available.