Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-730

Allow turning off PackageDataCalculation

    XMLWordPrintable

Details

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major Major
    • 1.1.4
    • 0.9.28
    • logback-classic
    • None
    • Windows 7, Equinox (OSGi)

    Description

      Logback offers the feature to print stack traces with package data information.
      It is possible to turn of the package data information printing with the option "%ex" individual on each appender.
      However in our context, the calculation of the package information takes up to ten seconds. As the calculation is done synchronously and eagerly when the logging event is created, this directly impacts the performance of the caller regardless whether the %ex option is used or not.

      If the method setPackagingDataEnabled(false) on the LoggerContext is called, the performance impact vanishes.
      Now, instead of "blindly" casting the slf4jLogger into a logbackLogger I suggest to allow turning of this calculation by configuration. This way the dependency on logback in code can be avoided.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            mtd Guido Schollerer
            Votes:
            7 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: