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

Translate warn to warning for Elixir >= 1.11.0 #113

Merged
merged 1 commit into from Feb 21, 2024

Conversation

altjohndev
Copy link
Contributor

Logger.compare_levels/2 triggers IO.warn/1 whenever we use it with :warn as parameter:

Sadly, any backend configured for Logger will translate :warning level to :warn for backward compatibility (ref), which makes the current implementation of this library to always trigger the IO warn message for warning logs.

This PR addresses that by converting the log :warn level to :warning before calling Logger.compare_levels/2 for Elixir >= 1.11.0.

@altjohndev
Copy link
Contributor Author

Hi @AndrewDryga is this library currently active and accepting PRs?

@AndrewDryga
Copy link
Member

Hello @altjohndev, sure we accept PR's. But I have a strong feeling that I want to rewrite this library as a logger formatter now :)

@AndrewDryga AndrewDryga merged commit 41270ea into Nebo15:master Feb 21, 2024
@andreyuhai
Copy link

andreyuhai commented Feb 29, 2024

Could we get a release with this PR, please? We have the same issue spamming us.
Until then we could use the commit hash. Turns out we can't, since our package depends on this package. :/

@AndrewDryga
Copy link
Member

@andreyuhai @altjohndev sorry for making you wait guys, was trying to test it in our production first :). The version is published.

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.

None yet

3 participants