Hi: 

         After moved a web application from Tomcat to JBoss, I found that in DEBUG model there was some problem with the Log4j's conversion character 'L'. here are the details:

JBoss version: jboss-4.0.4.GA

The application's Log4j.xml:

                            …

                            <param name="ConversionPattern" value="%d{dd/MM/yyyy HH:mm:ss} %-2p %c:%L - %m%n"/>

                            …

Code for logging:

                    …

                            import org.apache.commons.logging.Log;

import org.apache.commons.logging.LogFactory;

 

private static Log _log = LogFactory.getLog(SampleClass.class.getName ());

_log.debug("Log4j log a DEBUG message");

 

Then in Tomcat, I can got: 10:17:57,359 DEBUG SampleClass:18 - Log4j log a DEBUG message ()

In JBoss it turned to: 10:17:57,359 DEBUG SampleClass: 84 - Log4j log a DEBUG message ()

 

How could the Line NO. turned from 18 to 84, and how to fix this problem? We need the line NO. to debug this software system.

I'll be very grateful if someone could give me some help, my captain have order me to go through the JBoss' source code to find out the answer, but it terrible for me to do like he said.

 Best Regards

Adam

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to