active-record-query-trace
active-record-query-trace copied to clipboard
not changing how logs are shown
Hello,
I'm trying to figure out an N+1 queries issue, but I can't figure out how to get this gem working for me, on rails 6.1.6.1
Nothing I do seems to change how activerecord queries are logged.
that is:
2022-08-10 08:35:18.536410 D [74:puma srv tp 004] (0.006ms) ActiveRecord -- Model Load -- { :sql => "SELECT ....", :binds => { .... }, :allocations => 1, :cached => true }
here's my configuration of the gem:
if Rails.env.development?
ActiveRecordQueryTrace.enabled = true
ActiveRecordQueryTrace.level = :full
ActiveRecordQueryTrace.colorize = true
# Optional: other gem config options go here
end
I added a byebug line here, and it's called a bunch of times at rails boot up time (Flipper gem loading the features) which are not logged at all. but then it's not called anymore.
Any ideas?
Thanks.
Hi there,
Apologies for the late reply. I wish I could help you debug this but I currently don't have the bandwidth for it.