[jboss-user] [EJB 3.0] - Re: Stop hibernate to log errors in log4j error level

jaikiran do-not-reply at jboss.com
Mon Jul 21 04:35:51 EDT 2008


Change the logging level of the hibernate package to FATAL (if you don't need ERROR messages):

<category name="org.hibernate">
  |      <priority value="FATAL" />
  |    
  |    </category> 

or the other way is to change the Threshold of the SMTPAppender to FATAL. But note that ERROR messages from non-hibernate packages too will be ignored in this case.

<appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
  |      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
  |      <param name="Threshold" value="FATAL"/>
  |      <param name="To" value="admin at myhost.domain.com"/>
  |      <param name="From" value="nobody at myhost.domain.com"/>
  |      <param name="Subject" value="JBoss Sever Errors"/>
  |      <param name="SMTPHost" value="localhost"/>
  |      <param name="BufferSize" value="10"/>
  |      <layout class="org.apache.log4j.PatternLayout">
  |        <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
  |      </layout>
  |    </appender>

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165590#4165590

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165590



More information about the jboss-user mailing list