Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-6342

Log Appender is always adding location information causing an expensive new Throwable() to be called for every log

    XMLWordPrintableJSON

Details

    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: 

      putLocation(data, event.getLocationInformation());
      

      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. 

       

       

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              raviu Ravi Undupitiya
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: