Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-612

Reduce log4j2 initialization time: consider reusing PatternParser in RollingFileAppender

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Do
    • 2.0-rc1
    • None
    • None

    Description

      Creating a RollingFileAppender leads to creation of a RollingFileManager
      which creates a PatternProcessor, which creates a PatternParser.
      The PatternParser will start out a plugin find expedition on the classpath which takes some time.
      This is done for every RollingFileAppender you create. In my case the log file naming pattern is always the same for all log files, so I do not see the necessity for this plugin finding expedition. For instance PatternLayout does not do this as long as you supply a Configuration object which reuses the PatternParser for this Configuration object.
      Can RollingFileManager follow the same pattern as PatternLayout does?

      Attachments

        Activity

          People

            Unassigned Unassigned
            JanStolze Jan Stolze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: