[
https://issues.apache.org/jira/browse/KARAF-6342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ravi Undupitiya updated KARAF-6342:
-----------------------------------
Description:
This Jira is to propose an improvement to the Karaf Decanter Log Appender.
The current LogAppender does the following for every invocation of a log
message:
{code:java}
putLocation(data, event.getLocationInformation());
{code}
This operation calls log4j's
org.apache.log4j.spi.LoggingEvent#getLocationInformation() which does a new
Throwable() and this can be expensive.
For some uses cases, the location information is not important for every log
and therefore it would be great if we can disable location info when not
required.
was:
This Jira is to propose an improvement to the Karaf Decanter Log Appender.
The current LogAppender does the following for every invocation of a log
message:
{code:java}
putLocation(data, event.getLocationInformation());
{code}
This operation calls log4j's
org.apache.log4j.spi.LoggingEvent#getLocationInformation() which does a new
Throwable().
For some uses cases, the location information is not important for every log
and therefore it would be great if we can disable location info when not
required.
> Log Appender is always adding location information causing an expensive new
> Throwable() to be called for every log
> ------------------------------------------------------------------------------------------------------------------
>
> Key: KARAF-6342
> URL: https://issues.apache.org/jira/browse/KARAF-6342
> Project: Karaf
> Issue Type: Improvement
> Components: decanter
> Affects Versions: decanter-2.2.0
> Reporter: Ravi Undupitiya
> Priority: Major
> Labels: pull-request-available
> Fix For: decanter-2.3.0
>
>
> This Jira is to propose an improvement to the Karaf Decanter Log Appender.
> The current LogAppender does the following for every invocation of a log
> message:
> {code:java}
> putLocation(data, event.getLocationInformation());
> {code}
> This operation calls log4j's
> org.apache.log4j.spi.LoggingEvent#getLocationInformation() which does a new
> Throwable() and this can be expensive.
> For some uses cases, the location information is not important for every log
> and therefore it would be great if we can disable location info when not
> required.
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)