Antonio Jesus Simon Escanez created LOG4J2-963:
--------------------------------------------------

             Summary: Location Info is not rigth
                 Key: LOG4J2-963
                 URL: https://issues.apache.org/jira/browse/LOG4J2-963
             Project: Log4j 2
          Issue Type: Bug
          Components: Pattern Converters
         Environment: production
            Reporter: Antonio Jesus Simon Escanez
            Priority: Minor


HI.
This bug is for Log4j 1.2.17 and I am not sure if it is also in 2.0. When 
org.apache.log4j.spi.LocationInfo get information of the class who write the 
log (looking for in the stack trace), there is two things:

1. Performance. In the constructor LocationInfo(Throwable t, String 
fqnOfCallingClass) is better walk from index 0 to straceTrace.length - 1 
instead of in reverse. The log wrraped class is very much nearest of index 0 
than index straceTrace.length - 1.

2. Bug. If the log wrapped class twice appears twice o more times in the 
stacktrace, you always get the first, when the right would be get the last. For 
this reason, you have to walk from index 0 to straceTrace.length - 1 instead of 
in reverse.

Regards.

P.D.: Please, it would be possible you generate log4j-1.2.18 with this fix? 
Thanks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to