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

Why is 'packages' property needed within Configuration tag

    XMLWordPrintableJSON

Details

    • Question
    • Status: Resolved
    • Minor
    • Resolution: Information Provided
    • None
    • None
    • Appenders

    Description

      Hi there;

      I've created my custom log appender and was working good on my local machine on IntelliJ, but It took time to make it properly working on DEV environment after fat jar is created and deployed.

      The reason was 'packages' property inside the tag 'Configuration' in log4j2 xml file. While it was working without the 'packages' property on my local, it doesn't work with fat jar. 

      Why do I have to point the package of the custom appender file on log4j2 xml to make it scan and found my file?  The custom appender class is already annotated with

      @Plugin(...)

       and what I am expected to see is that log4j will find that class without any package name given on log4j2.xml. 

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            barissss Baris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: