You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Frank Conover (JIRA)" <ji...@apache.org> on 2016/09/27 22:15:20 UTC

[jira] [Commented] (LOG4J2-1614) Package attribute for discovering custom plugins within jars fails

    [ https://issues.apache.org/jira/browse/LOG4J2-1614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15527571#comment-15527571 ] 

Frank Conover commented on LOG4J2-1614:
---------------------------------------

Some test notes...

I am exporting a project as a jar from eclipse via right clicking the project and selected export. Even with annotation processing on, the Log4j2Plugins.dat file is not generated.

Next I compiled my project using with a script using javac and a Log4j2Plugins.dat file was created.

Just to verify the dat file option works. Using my original log4j2.xml file with the packages attribute still configured and trace on, I get the message that 0 appenders were found but my appender does get created. I took the packages attribute out and the 0 appenders line goes away and the appender is still created. So the dat file option is working for me.

> Package attribute for discovering custom plugins within jars fails
> ------------------------------------------------------------------
>
>                 Key: LOG4J2-1614
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1614
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders, Core
>    Affects Versions: 2.3, 2.6.2
>            Reporter: Frank Conover
>         Attachments: output-log.txt
>
>
> I am experiencing this issue with 2.6.3 and I tried 2.3. I have a custom plugin in a jar file. Works fine from eclipse, or a non-jar java app but not as a jar project. I have packages="... attribute filled out in my log4j2.xml. I added it to get the custom appender found while running from eclipse. As a non-maven program using jars which are on the classpath the appender is not found. Is there another way I should be doing this? Is packages still fixed / or still an available feature?
> Note: If I extract my jars and run, the appender is found.
> See: LOG4J2-741
> This referenced issue and the stack overflow link in the description of this issue sound like my issue. Do I need to compile with a certain flag turned on? Generate my jar a certain way?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org