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

Add formatter= method to make the logging gem compatible with rails 7.1 #246

Merged
merged 1 commit into from
Jun 8, 2024

Conversation

ag4ta
Copy link
Contributor

@ag4ta ag4ta commented Nov 16, 2023

Hi,

Following the convention to make the logging gem compatible with Rails versions I added empty formatter=(_formatter) method.

This PR is my attempt to solve the issue #245

As I investigated Rails 7.1 introduces some changes in Rails logger and when someone upgrades their Rails they get the error:

NoMethodError: undefined method `formatter='

Here is the link to Rails guide with details.

@TwP could you please take a look at this PR? I would be very happy if this is proper way to solve the issue and if it would be merged 😊

Resolves issue: #245

@juna-nb
Copy link

juna-nb commented Apr 8, 2024

Confirming this also fixes the issue for me using Rails 7.1 and Ruby 3.3.
I was getting the error while trying to use zormandi/logcraft#5 (comment).
Thanks for the fix @ag4ta, looks like I might need to use a fork of your version until they can push an update.

Copy link
Owner

@TwP TwP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request - apologies for taking so long to get around to pulling this into the main branch.

@TwP TwP merged commit 55f7966 into TwP:master Jun 8, 2024
@mhenrixon
Copy link

Thank you for the pull request - apologies for taking so long to get around to pulling this into the main branch.

OSS is hard at times, no hard feelings.

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.

4 participants