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

Mck SembWever commented on LOG4J2-673:
--------------------------------------

{quote}log4j-core has never required a packages element. Package elements have 
only been required for other jars if they didn't invoke the PluginManager as 
part of their build process. If they did that then the package wasn't required 
to be declared in the configuration.{quote}

Yes this was my meaning. We had tried to get PluginManager integrated into the 
build process with 2.0-rc1 without any luck (or it worked but never gave any 
performance improvement – 2.0-rc1 made applications hang for up to 30 seconds 
during startup…)
I suspect the majority of people were taking the packages approach over the 
PluginManager during building approach.

{quote}I would think it would be very easy to create a transformer 
though.{quote}

Does going down this approach require (a separate patch to maven-shaded-plugin 
and then) for us to wait until a new maven-shaded-plugin version is released? 
We were kinda hoping we get remove the 30 second startup hang as soon as 
2.0-rc2 was released…

> plugin preloading fails in shaded jar files
> -------------------------------------------
>
>                 Key: LOG4J2-673
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-673
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-rc2
>            Reporter: Mck SembWever
>            Priority: Critical
>              Labels: annotations, compiler, plugins
>             Fix For: 2.0-rc2
>
>         Attachments: 
> 0002-LOG4J2-673-plugin-preloading-fails-in-shaded-jar-fil.patch
>
>
> Support for plugin preloading through the standard 
> javax.annotation.processing tool was adding in LOG4J2-595
> But the plugin processor always creates and stores the processed "Plugin" 
> annotated classes into the same file. This works fine when the classpath 
> consists of individual jar files, but fails when shaded jar files are used.
> A tested fix exists at 
> https://github.com/finn-no/logging-log4j2/tree/bugfix/LOG4J2-673
> There's also a github pull request and a manual diff attached. (I can clean 
> up anything not used afterwards)
> The fix saves the dat file in a location under META-INF that matches the 
> shared package all the processed plugins are found under.
> The package attribute in the config file is then used so that multiple dat 
> files can be loaded at runtime.
> This means that the package attribute is no longer deprecated.
> This has been tested against 
> https://github.com/finn-no/log4j2-logstash-jsonevent-layout



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

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

Reply via email to