env_logger::init_or_default("mylib=warn") #113
No reviewers
Labels
No labels
bug
duplicate
easy
enhancement
help wanted
invalid
question
rfc
structured-logging
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-rust-lang/log!113
Loading…
Reference in a new issue
No description provided.
Delete branch "init-or-default"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Function parameter is used as logging spec when RUST_LOG variable
is not available.
Thanks! How would you feel about accomplishing this with LogBuilder instead?
I am concerned that
init_or_defaultdoes not compose well with other functionality we may want to expose here, for exampletry_initfrom #146.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.
init_or_defaultdoes not solve any otherwize unsolvable problems, it's just convenient to have.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:
Thanks @stepancheg! Do you mind rebasing this over at https://github.com/sebasmagri/env_logger, which is the new home for
env_logger?It would be good for this to be composable within the builder.
I'll go ahead and close this now, please feel free to file against the new
env_loggerrepo.Pull request closed