The SemanticLogger v4.4.0 gem was added to the repository, and now when using the rails console all the ActiveRecord queries are gone:
before:
> MyModel.last
MyModel Load (3.4ms) SELECT `my_models`.* FROM `my_models` ORDER BY `my_models`.`id` DESC LIMIT 1
=> #<MyModel:0x00007ff
id: ...
after:
> MyModel.last
=> #<MyModel:0x00007ff
id: ...
I tried different setup flags for SemanticLogger but haven't found the one that returns the queries as before, and now is more complicated to detect poorly performance queries.
As a "partial-fix" I currently add it in a group and skipped develop:
gem 'rails_semantic_logger', group: %i[production qa]
This works on my local but I wish I could make it work on all environments.