Database adaptor password in production.log

So, as I’m working on migrating my app from Rails 1.2.1 to Rails 1.2.6,
suddenly my database adaptor password is showing up in production log on
startup. This could be because use "
ActiveRecord::Base.allow_concurrency = true" (I know, nobody else does
and you’ll tell me not to do it. But I’ve investigated it and it’s
working for me, that’s not what this question is about).

So this didn’t used to happen. But now, for some reason, the production
log begins with:

allow_concurrency=true
Defined connections:
{“ActiveRecord::Base”=>#<ActiveRecord::Base::ConnectionSpecification:0xb6b52924
@config={:port=>XXXX, :username=>“XXXXXX”, :database=>“XXXX”,
:password=>“XXXX”, :adapter=>“mysql”, :host=>“xxx.xxx.jhu.edu”},
@adapter_method=“mysql_connection”>}

Except with the X’s. My actual database password is in production log.
I’d rather avoid this. Anyone have any ideas for keeping this out of
production.log?

Jonathan

Being new to the game, beats me why your password/etc. is showing in
the log. You could find the offending entity by grepping the
source…but I’ve seen most people replacing the logger with their own
logger & thus filtering what actually gets stored.
Here’s a link to such a thing:
http://blog.teksol.info/2007/6/13/how-to-set-logger-options-in-rails
-Dale

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs