title: PostgreSQL: Where does the output of ereport() go?
body: <p>I am in the middle of developing a C extension library for PostgreSQL. I am using a lot of ereport() calls to help with future debugging. </p>
  
  <p>A typical example of usage in my code would be something like this:</p>
  
  <pre><code>ereport(NOTICE, (errmsg("[%s]: Returned nonzero result (%d).", (const char*)__FUNCTION__, ret)) );
  </code></pre>
  
  <p>However, when I look in /var/log/postgresql/postgresql-8.4-main.log my messages do not seem to be appearing there - only messages from what I assume is the db server daemon.</p>
  
  <p>So, where are my log messages being stored?</p>
  
  <p>BTW, I am running PG 8.4 on Ubuntu Linux (10.0.4)</p>