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

Call to non-existant method Rails::Logger.warning (should be warn) #294

Closed
ellnix opened this issue Sep 28, 2023 · 0 comments · Fixed by #295
Closed

Call to non-existant method Rails::Logger.warning (should be warn) #294

ellnix opened this issue Sep 28, 2023 · 0 comments · Fixed by #295

Comments

@ellnix
Copy link
Collaborator

ellnix commented Sep 28, 2023

Description
In MeiliSearch::Rails::Pagination.log_pagy_error there is a call to Logger#warning which does not exist. In fact triggering this warning by adding pagination_backend: 'pagy' in MeiliSearch::Rails.configuration will throw an error upon trying to paginate search results.

Expected behavior
A warning is logged, execution continues.

Current behavior
The request gets interrupted by an exception.

Screenshots or Logs

NoMethodError (undefined method `warning' for #<ActiveSupport::Logger:0x00007f3fbdc5ab30 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007f3fbdc4d
f98 @datetime_format=nil>, @formatter=#<ActiveSupport::Logger::SimpleFormatter:0x00007f3fbdc5a9c8 @datetime_format=nil, @thread_key="activesupport_tagged_logging_tags:1
4380">, @logdev=#<Logger::LogDevice:0x00007f3fbdc4de58 @shift_period_suffix="%Y%m%d", @shift_size=1048576, @shift_age=0, @filename="/home/ellnix/Code/github/ell
nix/meilisearch_rails_bookstore/log/development.log", @dev=#<File:/home/ellnix/Code/github/ellnix/meilisearch_rails_bookstore/log/development.log>, @binmode=fal
se, @mon_data=#<Monitor:0x00007f3fbdc4de08>, @mon_data_owner_object_id=3940>>

          .warning('[meilisearch-rails] Remove `pagination_backend: :pagy` from your initializer, `pagy` it is not required for `pagy`')
          ^^^^^^^^
Did you mean?  warn):

Environment (please complete the following information):

  • OS: [Fedora GNU/Linux]
  • Meilisearch server version: [v.1.3.5]
  • meilisearch-rails version: [v0.10.0]
  • Rails version: [7.0.8]
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 a pull request may close this issue.

1 participant