title: Does "Connecting to database specified by database.yml" simply indicate that the server has started
body: <p>I'm looking though my production log to investigate a bug on a rails 3.2 app. When getting the server back up, I restarted the app. The only evidence for the restart in the production log seems to be this entry:</p>
  
  <blockquote>
    <p>Connecting to database specified by database.yml</p>
  </blockquote>
  
  <p>Is this the only occasion when this message will appear? That is, can I always assume this message indicates an app start?</p>
  
  <p>Searching stackoverflow, the references I find to this log output seem to look upon it as an error. For example:</p>
  
  <p><a href="https://stackoverflow.com/questions/17585979/what-does-connecting-to-database-specified-by-database-yml-in-the-log-file-mea?s=2|2.7349">what does &quot;Connecting to database specified by database.yml&quot; in the log file mean?</a></p>
  
  <p>However, I think this is in fact the last successful log message before the error. That is, it is not an error message, but rather indicates that the app got as far as initiating the connection to the database, before the error occurred.</p>
  
  <p>Having this as the only log output on app restart seems confusing to me (and from the other stackoverflow entries, it confuses others too). </p>
  
  <p>I've added an initializer 'config/initializers/log_app_start.rb' to my app with this content:</p>
  
  <pre><code>Rails.logger.info 'App starting: Initializer called'
  </code></pre>
  
  <p>I now get this in the log on restart:</p>
  
  <blockquote>
    <p>Connecting to database specified by database.yml </p>
    
    <p>App starting: Initializer called</p>
  </blockquote>
  
  <p>Which at least adds some context to the log entry. However, it would be nice to have the 'App starting' before the 'Connecting to database' entry.</p>
  
  <p>Is there a better way to log app restarts in the production logs?</p>