27.03.2013 Views

JBoss Enterprise Application Platform Common Criteria Certification ...

JBoss Enterprise Application Platform Common Criteria Certification ...

JBoss Enterprise Application Platform Common Criteria Certification ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

18 Chapter 3. Logging<br />

The first way is to explicitly enable it in your code.<br />

SessionFactory sf = new Configuration()<br />

.setProperty("hibernate.show_sql", "true")<br />

// ...<br />

.buildSessionFactory();<br />

Alternately, you can configure Hibernate to send all SQL messages to log4 j, using a specific facility:<br />

log4j.logger.org.hibernate.SQL=DEBUG, SQL_APPENDER<br />

log4j.additivity.org.hibernate.SQL=false<br />

The additivity option controls whether these log messages are propagated upward to parent<br />

handlers, and is a matter of preference.<br />

3.2.2. Transaction Service Logging<br />

The TransactionManagerService included with the <strong>Enterprise</strong> <strong>Platform</strong> handles logging differently than<br />

the stand-alone Transaction Service. Specifically, it overrides the value of the<br />

com.arjuna.common.util.logger property given in the jbossjta-properties.xml file, forcing use of<br />

the log4 j_releveler logger. All INFO level messages in the transaction code behave as DEBUG<br />

messages. Therefore, these messages are only present in log files if the filter level is DEBUG. All other<br />

log messages behave as normal.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!