Forum: Ruby on Rails ActiveRecord vs logger

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Warren S. (Guest)
on 2006-05-17 20:53
(Received via mailing list)
Appendix B.1 of the Agile book says you can configure as follows:

B.1 Active Record Configuration

ActiveRecord::Base.logger =logger

Accepts a logger object. This is used internally to record database

activity. It is also available to applications that want to log

Yet, as far as I know, there is no way to use and friends
within a model.  Is
there?   Or is this simply a way to redirect the internal logging

that goes on?

W Fred
steve ross (Guest)
on 2006-05-18 00:03
(Received via mailing list)
Use RAILS_DEFAULT_LOGGER if you want your log messages in the default
log files. You can use this anyplace in a Rails app (plugins are a great

This topic is locked and can not be replied to.