# Database adaptor password in production.log

**URL:** <https://www.ruby-forum.com/t/database-adaptor-password-in-production-log/134515>\
**Category:** Rails\
**Created:** [April 11, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/database-adaptor-password-in-production-log/134515 "2008-04-11T16:52:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [April 11, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/database-adaptor-password-in-production-log/134515/1 "2008-04-11T16:52:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [April 18, 2008, 6:05pm UTC](https://www.ruby-forum.com/t/database-adaptor-password-in-production-log/134515/2 "2008-04-18T18:05:27Z")

</div>

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](http://blog.teksol.info/2007/6/13/how-to-set-logger-options-in-rails)  
-Dale
