title: EclipseLink and log4j: how to use both
body: <p>I'm using Eclipselink JPA provider, and noticed that it writes in console only. 
  I configured both the console and file appenders, but EclipseLink log entries (SQL queries for example) are appeared only in the console log. 
  How to fix it?</p>
  
  <p>Here is my log4j configuration:</p>
  
  <pre><code>log4j.rootLogger=ALL, FILE, CONSOLE
  
  log4j.logger.uk.co.mycompany=DEBUG
  
  log4j.logger.org.eclipse.persistence=ALL
  
  log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender 
  log4j.appender.FILE.File=${catalina.base}/logs/application.log
  log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
  log4j.appender.FILE.layout.ConversionPattern=%d{HH:mm:ss, SSS} %t [%p] %c{1} - %m%n
  
   # CONSOLE is set to be a ConsoleAppender using a PatternLayout.
  log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
  log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
  log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%p] %m%ne
  </code></pre>
  
  <p>In the persistence.xml:</p>
  
  <pre><code>...
      &lt;properties&gt;
          &lt;property name="eclipselink.logging.level" value="FINE"/&gt;           
      &lt;/properties&gt;
  </code></pre>