JBoss's Log4J implementation in EAP6 can only log Strings
Issue
Before moving to EAP 6, I would invoke Log4J like this:
org.apache.log4j.Logger log = Logger.getLogger(getClass());
...
MyObject obj = new MyObj(...);
log.info(obj);
I would then receive the object in the appender and perform logging-related tasks using the data from the object. When I try this on EAP 6, JBoss calls obj.toString() before passing the log message to the handler/appender. When my appender tries to use the object, it fails because the object was disposed of, and all that's left is the String representation.
Will JBoss fix this regression?
Environment
- JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.