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

Remko Popma commented on LOG4J2-728:
------------------------------------

Sorry for being unclear. 
During the log4j2 build, all classes containing plugin annotations are listed 
up in an index file in order to allow log4j2 to quickly find its plugins during 
startup. The log4j2 index file is located here: 
{{META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat}}

For custom plugins, a similar .dat file is created during the build of your 
plugin. This is done by the annotation processor that is included in the 
log4j-core jar. Without this .dat file log4j2 will not be able to find your 
plugin (there used to be an alternative mechanism with the packages="..." 
attribute in the <Configuration> element but since rc2 this does not work any 
more unfortunately).

The IntelliJ settings above were mentioned by another user on the mailing list 
as the steps they took to let IntelliJ generate the .dat file. (They ran "mvn 
package" next from inside IntelliJ.)

> Look for log4j2.xml in assets folder (or the application data) in an Android 
> APK.
> ---------------------------------------------------------------------------------
>
>                 Key: LOG4J2-728
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-728
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.0-rc2
>         Environment: Android
>            Reporter: Nelson MELINA
>              Labels: android
>
> To add files in an Android apk, you need to put them in an assets folder and 
> then they are in an "assets" folder in the APK.
> Log4j 2 needs to find it there when it exists (not the case now).
> Also would it be possible to load the xml configuration file from the 
> application data ( 
> https://developer.android.com/guide/topics/data/data-storage.html ) ?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to