-
Notifications
You must be signed in to change notification settings - Fork 24
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
Allow configuration via TOML file #167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for introducing the TOML configuration file. I think that more convenient would be to load the TOML config file first (if present) and allow to override some config options with evn vars. Do you think this is possible and make sense?
After my first review focused mostly on the code, I didn't find anything requiring a change.
It'd be good to add some tests, which as far as I know you are going to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technical review: looks good, one minor question.
The overall impression is that overriding the options is a bit complicated and inconsistent (in the code) but acceptable.
Language check recommended, multiple articles missing and "it's" instead of "its", @goddammit
@@ -1,6 +1,7 @@ | |||
use Mix.Config | |||
|
|||
config :mongoose_push, loglevel: :debug | |||
config :mongoose_push, :logging, level: :error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why change debug to error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's annoying to deal with sheer volume of debug logs, when developer just wants to enter application's shell and actually see commands you execute. As developer I don't need debug logs more often then I need them, so I prefer to have to enable debug logs explicitly, instead of constantly switching them off ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that ^ :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, now it's explicit. I couldn't find it in the PR description somehow ;-)
It's good to describe such things so they don't look like mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might very well be that "unset" is correct in that context
You're right, I haven't though about it. Maybe indeed it would be nice to reverse that. I will give it a bit of time, but this will not be trivial. Confex env configuration is based on original |
Co-authored-by: K. Kraus <katarzyna.kraus@erlang-solutions.com>
Co-authored-by: K. Kraus <katarzyna.kraus@erlang-solutions.com> Co-authored-by: Michał Piotrowski <michal.piotrowski@erlang-solutions.com>
@michalwski @leszke It's not easy to override TOML with env variables - to do this in non-hacky way, we would need to rethink the env configuration, as Confex library doesn't work well in such scenario. |
No description provided.