Note that there are some explanatory texts on larger screens.

plurals
  1. POConfiguring Hibernate logging using Log4j XML config file?
    primarykey
    data
    text
    <p>I haven't been able to find any documentation on how to configure Hibernate's logging using the XML style configuration file for Log4j.</p> <p>Is this even possible or do I have use a properties style configuration file to control Hibernate's logging?</p> <p>If anyone has any information or links to documentation it would appreciated.</p> <p><strong>EDIT:</strong><br/> Just to clarify, I am looking for an example of the actual XML syntax to control Hibernate.</p> <p><strong>EDIT2:</strong><br/> Here is what I have in my XML config file.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt; &lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt; &lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"&gt; &lt;appender name="console" class="org.apache.log4j.ConsoleAppender"&gt; &lt;param name="Threshold" value="info"/&gt; &lt;param name="Target" value="System.out"/&gt; &lt;layout class="org.apache.log4j.PatternLayout"&gt; &lt;param name="ConversionPattern" value="%d{ABSOLUTE} [%t] %-5p %c{1} - %m%n"/&gt; &lt;/layout&gt; &lt;/appender&gt; &lt;appender name="rolling-file" class="org.apache.log4j.RollingFileAppender"&gt; &lt;param name="file" value="Program-Name.log"/&gt; &lt;param name="MaxFileSize" value="1000KB"/&gt; &lt;!-- Keep one backup file --&gt; &lt;param name="MaxBackupIndex" value="4"/&gt; &lt;layout class="org.apache.log4j.PatternLayout"&gt; &lt;param name="ConversionPattern" value="%d [%t] %-5p %l - %m%n"/&gt; &lt;/layout&gt; &lt;/appender&gt; &lt;root&gt; &lt;priority value ="debug" /&gt; &lt;appender-ref ref="console" /&gt; &lt;appender-ref ref="rolling-file" /&gt; &lt;/root&gt; &lt;/log4j:configuration&gt; </code></pre> <p>Logging works fine but I am looking for a way to step down and control the hibernate logging in way that separate from my application level logging, as it currently is flooding my logs. I have found examples of using the preference file to do this, I was just wondering how I can do this in a XML file.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload