# Problem with ActiveRecord::Base.logger

**URL:** <https://www.ruby-forum.com/t/problem-with-activerecord-base-logger/188548>\
**Category:** Rails\
**Created:** [May 13, 2010, 7:42pm UTC](https://www.ruby-forum.com/t/problem-with-activerecord-base-logger/188548 "2010-05-13T19:42:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogergl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/5f9b8f/32.png) [@rogergl](https://www.ruby-forum.com/u/rogergl)\
**Post date:** [May 13, 2010, 7:42pm UTC](https://www.ruby-forum.com/t/problem-with-activerecord-base-logger/188548/1 "2010-05-13T19:42:42Z")

</div>

I’m using jruby and ActiveRecord in a Swing based application. Until  
now I used Rails 2.3.5. Today I migrated to Rails 3 which seems to  
work ok. The only problem I have is that I can no longer use the  
ActiveRecord logging. Until now I used the following code to enable  
logging:

ActiveRecord::Base.establish\_connection(conf[“mysql”])

if $global\_enable\_db\_logging  
ActiveRecord::Base.logger = Logger.new(STDERR)  
end

Any ideas how to make this work again ?

Regards  
Roger
