Apache Karaf 2.3.0 has the following default log4j configuration

log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p |
%-16.16t | %-32.32c{1} | %-32.32C %4L | %X{bundle.id} -
%X{bundle.name} - %X{bundle.version} | %m%n

Notice that we use %4L to output the source code lines

But according to log4j documentation this is extremely slow
http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html

L       Used to output the line number from where the logging request was 
issued.
WARNING Generating caller location information is extremely slow and
should be avoided unless execution speed is not an issue.


I just wonder if pax-logging or something has some improvements so
this in not the case for Karaf?


-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to