Apache Karaf - Default logging pattern in org.ops4j.pax.logging.cfg

2013-02-28 Thread Claus Ibsen
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: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Apache Karaf - Default logging pattern in org.ops4j.pax.logging.cfg

2013-02-28 Thread Jean-Baptiste Onofré

Hi Claus,

nice catch, I gonna take a look in Pax Logging how we handle this 
(direct delegation to Log4j or wrapper on top).


Thanks
Regards
JB

On 02/28/2013 10:57 AM, Claus Ibsen wrote:

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?




--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com