Rails:在生产日志中显示SQL查询

时间:2023-01-19 22:02:19

How can we enabled SQL query logging in production environment?

如何在生产环境中启用SQL查询日志记录?

Thanks,

谢谢,

Imran

伊姆兰

1 个解决方案

#1


46  

In your environments/production.rb

在您的环境/ production.rb中

config.log_level = :debug

Remember you need to restart the web server to apply the changes.

请记住,您需要重新启动Web服务器才能应用更改。

#1


46  

In your environments/production.rb

在您的环境/ production.rb中

config.log_level = :debug

Remember you need to restart the web server to apply the changes.

请记住,您需要重新启动Web服务器才能应用更改。