mysql - ActiveRecord SQL queries not getting logged -
i have been facing weird problem time, wherein activerecord queries not getting logged in terminal, or in rails console (using activerecord::base.logger = logger.new(stdout)
).
this exception get:
could not log "sql.active_record" event. nameerror: undefined local variable or method `s' # activesupport::notifications::event:0x007f9ae02a60c0.
i tried out few things, including reinstalling rails, no avail.
apart wondering why happening, i’m unable check actual sql queries fired against database result.
i ran similar ways back.
i able fix adding
# config/environments/development.rb config.logger = logger.new(stdout)
and
# config/environment.rb # prevent log buffering $stdout.sync = true
Comments
Post a Comment