-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
allow new log levels #63
Conversation
lib/site_encrypt.ex
Outdated
log_levels = | ||
if Version.compare(System.version(), "1.11.0") in [:gt, :eq] do | ||
[:error, :info, :debug, :emergency, :alert, :critical, :warning, :notice] | ||
else | ||
[:debug, :info, :warn, :error] | ||
end | ||
|
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.
I don't think there's need for these version gymnastics. I propose we use Logger.levels/0
, but we should then change mix.exs and require 1.16+. WDYT?
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.
Of course I prefer this :)
I just didn't think it was appropriate to ask for dropping support for old Elixir versions just to support my little feature request.
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.
I'll update the PR in the next few minutes.
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! |
👋
I'd like to use NOTICE log level for SiteEncrypt messages and this PR should allow that. I'm not sure when if
Logger.levels/0
was available in Elixir v1.10, but I'll try to find out.Seems to be available only since v1.16.0 https://hexdocs.pm/logger/1.17.0/Logger.html#levels/0, I'll hardcode it then.
The extended log levels were made available in v1.11.0 https://hexdocs.pm/logger/1.11.0/Logger.html#module-levels