[
https://issues.apache.org/jira/browse/LOG4J2-1972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16080479#comment-16080479
]
Ralph Goers commented on LOG4J2-1972:
-------------------------------------
The packages attribute is specified on the root Configuration element, not on
individual components such as your appender - unless, of course, your plugin
has defined a packages attribute.
That said, if you are compiling with annotation processing enabled a file
describing your plugin should have been generated. If that file is present in
your jar you don't need to specify the packages attribute.
> The "packages" attribute in appender configuration reporting ERROR
> ------------------------------------------------------------------
>
> Key: LOG4J2-1972
> URL: https://issues.apache.org/jira/browse/LOG4J2-1972
> Project: Log4j 2
> Issue Type: Question
> Environment: Linux Red Hat.
> Reporter: Seweryn Habdank-Wojewodzki
> Priority: Minor
>
> We are using Log4j2 v. 2.8.
> We have own appender configuration more less:
> {code:xml}
> <MyAppender name="MyAppender" ignoreExceptions="false"
> packages="my.company.myappender.log4j2">
> ...
> <CustomField name="sourceApplication">my-app</CustomField>
> </MyAppender>
> {code}
> In the documentation [Property
> Substitution|https://logging.apache.org/log4j/2.x/manual/configuration.html#Property%20Substitution]
> we can read:
> packages A comma separated list of package names to search for plugins.
> Plugins are only loaded once per classloader so changing this value may not
> have any effect upon reconfiguration.
> But anyhow we got error:
> {{2017-07-10 16:37:03,017 localhost-startStop-3 ERROR MyAppender contains an
> invalid element or attribute "packages"}}
> How shall we handle this attribute?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)