Log4jImpl: show line numbers of calling class, not of Log4jImpl
---------------------------------------------------------------
Key: JGRP-1069
URL:
https://jira.jboss.org/jira/browse/JGRP-1069
Project: JGroups
Issue Type: Bug
Reporter: Bela Ban
Assignee: Bela Ban
Priority: Minor
Fix For: 2.8
Attachments: Log4JLogImpl.java
[David Forget]
We are using log4j as default logger, I have set my appender to use %l as you proposed but
all logs from JGroups always have the line number of the log implementer (Log4JLogImpl) as
opposed to the class calling the logger. In the following log example
(Log4JLogImpl.java:73), but we are interested to get the line number of
org.jgroups.JChannel not Log4JLogImpl.
<134>2009-09-29 13:44:12,376 INFO csp_in1 OTHER_0000 "JGroups
version:2.8.0.CR2" <VERBOSE=71> [Thread - WrapperStart]
(org.jgroups.JChannel)(Log4JLogImpl.java:73) <END>
My log4j.properties
---------------------
log4j.rootLogger=WARN, SYSLOG, FILE, CONSOLE
#define the appender named CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[%d} [%t] [%-5p] [%c] - [%l][%L][%m][%n]
log4j.logger.org.jgroups=DEBUG
I did a change to Log4JLogImpl to use same method as common logging and it work fine:
<134>2009-10-02 09:54:04,116 INFO csp_in1 OTHER_0000 "JGroups version:
2.8.0.CR2" <VERBOSE=69> [Thread - WrapperStart] (org.jgroups.JChannel)
(JChannel.java:1699) <END>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira