title: Play Framework 2.0 and Ebean SQL logging
body: <p>I want to examine what SQL statements are generated by Ebean to find out why certain exceptions (related to SQL syntax) are occurring in my Play 2.0 application. <strong>Is there a way to log the SQL statements generated by Ebean in Play Framework 2.0?</strong></p>
  
  <p>In Play 1.x, there is a <code>jpa.debugSQL</code> config option, which if set to true, will do exactly this. Does a similar setting for Ebean exist for Play 2.0? The <a href="http://www.playframework.org/documentation/2.0/JavaEbean" rel="noreferrer">documentation page about Ebean of Play 2.0</a> is still a bit scarce.</p>
  
  <hr>
  
  <p><strong>What I have tried so far:</strong></p>
  
  <p>I have added these method calls in my controllers and the <code>onStart</code> / <code>onRequest</code> methods of the Global object, but it doesn't have any effect:</p>
  
  <pre><code>Ebean.getServer(null).getAdminLogging().setLogLevel(LogLevel.SQL);
  Ebean.getServer(null).getAdminLogging().setDebugGeneratedSql(Play.isDev());
  </code></pre>
  
  <p>I have modified the log levels from <code>application.conf</code>, but it didn't help either (even with log level <code>TRACE</code>).</p>