Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility of hooking into env_logger or adding env_logger-compatible configuration? #61

Open
daboross opened this issue May 29, 2020 · 0 comments

Comments

@daboross
Copy link
Owner

It'd be nice to be able to use fern's manual configuration and at the same time still get an additional RUST_LOG interface with only an additional flag.

As with #60, I'm not sure if this fits the crate. I think if we reused or reimplemented only the parsing, though, we might be able to combine configurations from inside the program and from the env variable, to allow them to benefit eachother rather than replace eachother? And if we implement it as a feature flag, then it shouldn't be too much additional overhead.

I think most of that logic applies to #60 too, so implementing both might be a good idea. We could even try to accept log4rs-compatible configuration.


On the other hand, fern's configuration is infinitely recursive, and it wouldn't be entirely clear where to stick / allow the target filters. Maybe it'd have to be a method on dispatch, "allow_from_env"?

How does this scale to the file configuration, then? Does it? Not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant