Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Can you use jboss 2.4.6 with log4j?


Asked by Maggie Nguyen on Dec 07, 2021 FAQ



JBoss-2.4.6 includes the log4j 1.1.3 release while JBoss-3.0.0 includes the log4j 1.2.3 release. The JBoss-2.4.6 version can be used with the log4j 1.2 release by simply replacing the log4j.jar in the JBoss distribution with the 1.2 version of the log4j.jar.
Furthermore,
The JBoss server has standardized on log4j as its logging API. The switch to log4j has been a gradual one, and as of the 2.4.4 release, log4j is the only logging API used internally by JBoss. JBoss-2.4.6 includes the log4j 1.1.3 release while JBoss-3.0.0 includes the log4j 1.2.3 release.
Also Know, The JBoss org.jboss.log.Logger wrapper The JBoss server framework actually uses a simple wrapper around the log4j Category. This wrapper adds support for a custom TRACE level priority and removes the unused Category methods. This does not interfere with the log4j Category usage in any way.
Keeping this in consideration,
You have to balance how much logging is noise versus surfacing critical problems. You can specify in your log4j properties which log4j logging levels you want to log. You can use this to send all logs to a file on disk, but perhaps only fatal problems to a database or other appender.
Similarly,
JBoss EAP 6 supports all the log levels used by the supported application logging frameworks. The most commonly used six log levels are (in order of lowest to highest): TRACE, DEBUG, INFO, WARN, ERROR and FATAL .