# Outputting to log in Rails startup

**URL:** <https://www.ruby-forum.com/t/outputting-to-log-in-rails-startup/179746>\
**Category:** Rails\
**Created:** [December 3, 2009, 12:12am UTC](https://www.ruby-forum.com/t/outputting-to-log-in-rails-startup/179746 "2009-12-03T00:12:28Z")\
**Posts on this page:** 1\
**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:** [December 3, 2009, 12:12am UTC](https://www.ruby-forum.com/t/outputting-to-log-in-rails-startup/179746/1 "2009-12-03T00:12:28Z")

</div>

I’d like to output a couple messages to the log in the startup process  
– like in environment.rb, or an initializer, or a  
config.after\_initialize block, or what have you.

But I can’t get any of those to work, can’t figure out a way to put  
anything anywhere in the app startup process that results in something  
written to the log.

The reason I’d like to do this is to check certain application state and  
just output at startup, so it’s there in the log. For instance, what  
plugins or gems are loaded (since there’s lots of code that silently  
degrades to use certain gem if it’s there, another gem if it’s not. Like  
Nokogiri vs. REXML and such.) So I guess i need it to be at a point in  
the startup process after my config.gems have been loaded too – but  
even aside from that, i can’t get any log output at all to show up.

Am I missing something? Any hints?

Thanks,  
Jonathan
