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

Gary Gregory edited comment on LOG4J2-673 at 6/22/16 1:36 AM:
--------------------------------------------------------------

I just tried the transformer and I still get "ERROR StatusLogger Unrecognized 
conversion specifier..."

{code:xml}
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>2.4.3</version>
          <configuration>
            <transformers>
              <transformer 
implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer"
 />
            </transformers>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.github.edwgiz</groupId>
              
<artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId>
              <version>2.1</version>
            </dependency>
          </dependencies>
        </plugin>
{code}

Is this still supposed to work?

It looks like the code is hardwired to Log4j 2.1 and I am using 2.6.1. What 
will happen? A 2.1 dat file which won't work on 2.6.1?


was (Author: garydgregory):
I just tried the transformer and I still get "ERROR StatusLogger Unrecognized 
conversion specifier..."

{code:xml}
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>2.4.3</version>
          <configuration>
            <transformers>
              <transformer 
implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer"
 />
            </transformers>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.github.edwgiz</groupId>
              
<artifactId>maven-shade-plugin.log4j2-cachefile-transformer</artifactId>
              <version>2.1</version>
            </dependency>
          </dependencies>
        </plugin>
{code}

Is this still supposed to work?

It looks like the code is hardwired to Log4j 2.1 and I am using 2.6.1. What 
will happen?

> 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, 2.1
>            Reporter: mck
>            Assignee: Matt Sicker
>            Priority: Critical
>              Labels: annotations, compiler, plugins
>         Attachments: 
> 0002-LOG4J2-673-plugin-preloading-fails-in-shaded-jar-fil.patch, 
> 0005-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.3.4#6332)

---------------------------------------------------------------------
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