Loggin of sql statements

Is there a way to have rails log the sql statement that it runs. It
would be much easier for me to debug my code if I could actually see the
sql that active record is using.

recentrambles.com → use Time not DateTime

Take a look in “yourapp/log/development.log”. Already done for you!


On Feb 22, 2006, at 10:20 AM, Charlie B. wrote:

I you are running in development mode, your sql statements should be
logged in the development log. If you are running in production
mode, you and can uncomment the line in config/environment.rb that
sets the log level.

config.log_level = :debug

This will cause your sql statements to be logged.


Kim S. - principal, Shrier and Deihl - mailto:[email protected]
Remote Unix Network Admin, Security, Internet Software Development
Tinker Internet Services - Superior FreeBSD-based Web Hosting