I want all my ActiveRecord SQL records to be redirected to another file. It is useless to have it on the console or in the /development.log log.
How to do it? I would like to have it in the log / development_sql.log file.
thanks
ActiveRecord::Base.logger = Logger.new('log/development_sql.log')
You can set it in config/application.rb :
config/application.rb
config.active_record.logger = Logger.new("log/development_sql.log")
Source: https://habr.com/ru/post/887911/More articles:Multiple tags / folders in Google Reader - iphoneThe absolute minimum code in 1 aspx file that wakes .NET. - asp.netACL in ASP.NET MVC 3 - asp.netDo not answer when compiling this function? - compilationImplementing a SOAP client in C # with WCF and .NET 4.0 - c #Change your network operator to an Android app - androidHow to deal with the idea of "many small functions" for classes without passing many parameters? - c ++OQL syntax for counting criteria for matching objects - javaHow to add Razor to MVC 3 after updating from MVC 2 hard drive? - c #Can someone provide me a SOUNDEX similar SQL function that works correctly for INDIAN TITLES? - sqlAll Articles