-
1. Re: Log entries in EAP 7 do not show the module and line number correctly
jaikiran Jul 23, 2017 12:40 AM (in response to erichardesty1)Can you show us the code which logs this message? Also, what Java vendor and version do you use to compile your code? Did you maybe recompile it while deploying it to the newer EAP version?
-
2. Re: Log entries in EAP 7 do not show the module and line number correctly
erichardesty1 Jul 23, 2017 1:08 AM (in response to jaikiran)This was attempted using both the 7.1.0.Alpha & 7.1.0.Beta EAP versions but both fail in the same manner. It is compiled with Oracle jdk 1.8. It is compiled on Windows but deployed on Linux.
Here are the Log pieces of code:
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
static final String logName = CobolRuntimeSupport.class.getName();
private static final Log log = LogFactory.getLog(logName);
public void start() throws ResourceAdapterInternalException {
log.debug("ENTER");
....
log.debug("EXIT");
}
Every log message in that file handler have the same values for module and line number from every other class in the Resource Adapter.
Eric
-
3. Re: Log entries in EAP 7 do not show the module and line number correctly
jaikiran Jul 23, 2017 3:32 AM (in response to erichardesty1)Thanks for these details. This does look like a bug.
Based on what I see in your code (which uses the Apache commons logging), the pattern format string that you use and what's being logged, I think what's happening here is that the methodName (which the M represents) and the lineNumber (that L represents) are being picked up from the method and line number of the JBoss Logging adapter for Apache commons logging here commons-logging-jboss-logmanager/JBossLog.java at master · jboss-logging/commons-logging-jboss-logmanager · GitHub
-
4. Re: Log entries in EAP 7 do not show the module and line number correctly
jamezp Jul 24, 2017 12:16 PM (in response to erichardesty1)Jaikiran is correct. This is a bug in the commons-logging-jboss-logmanager project. This PR should fix it.
If you need a fix for EAP 7 feel free to file a bug. The workaround would be to not use commons-logging and use something like slf4j or jboss-logging for your logging facade. Though I realize swapping out a logging facade isn't always that simple.
--
James R. Perkins