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

Make Logger optional #46

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

scollon42
Copy link

@scollon42 scollon42 commented Apr 27, 2023

In this PR I wanted to introduce the possibility to swap the Logger implementation so that users can decide how WaffleEcto will log potential errors.

Having error log from an external library is not always wanted in production project and some might want to have control over that.

This PR gives now the ability to disable the error logs by adding this to a config file

config :waffle_ecto, :log_adapter, WaffleEcto.Logger.None

Note : I wanted to go the extra mile and add make this extendable using @callback instead of just adding a boolean to enable, disabled log. I think it might be useful but it also add more bit more code and I don't know if it will be used for anything else than disabling / enabling the log so.. 😄

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