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

Use env_logger filters #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IcanDivideBy0
Copy link

@IcanDivideBy0 IcanDivideBy0 commented Oct 15, 2021

Hello,
This PR adds env_logger as a dependency to re-use its filter system.
As seen in #21, having the ability to filter modules logs is pretty useful for development. The env_logger crate already does a pretty good job at it, plus controlling this behavior based on environment variables is really useful IMO.
Sadly due to the Logger structs being private to the crate, it's pretty hard to extend the functionalities of femme.
I can understand adding a dependency to env_logger might not be the desired path for this crate, I've tried to add it as a feature without a lot of success. So I see different possibilities:

  • use the PR as is and live with the new dependency
  • make a public trait and a new function which allows to access the underlying loggers
  • publish this pr as its own crate (env_femme?) (having more public things here would be helpful)

@IcanDivideBy0 IcanDivideBy0 force-pushed the env_logger branch 3 times, most recently from edf9085 to 6217832 Compare October 15, 2021 21:49
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

Successfully merging this pull request may close these issues.

1 participant