log4j Logger messages are not displayed on JBoss webapp

 ̄綄美尐妖づ 提交于 2019-12-05 18:41:23

Turns out my logging does work. Hibernate logging is controlled by the jboss logging settings.

My logging began to work as soon as I placed the log4j on right next to the classes folder, and placing log4j jar with the project

Vadzim

JBoss AS 6 doesn't use log4j by default anymore. Cause log4j 1.2.x proved to be vulnerable to deadlocks and performance problems.

Google suggests plenty of links on using log4j with JBoss AS 6:

Where do you configure log4j settings in jboss6

http://www.mastertheboss.com/jboss-application-server/325-using-log4j-with-jboss-6.html

http://community.jboss.org/thread/154993

http://community.jboss.org/thread/160796

http://community.jboss.org/thread/159862

But I would suggest switching apps from log4j to slf4j, using jboss-6.0.0.Final/common/lib/slf4j-jboss-logmanager.jar adapter and having all logging configuration in single jboss-logging.xml.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!