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

Why is 'packages' property needed within Configuration tag

    Details

    • Type: Question
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: 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

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

              Dates

              • Created:
                Updated: