You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "Tanner Altares (JIRA)" <ji...@apache.org> on 2017/07/11 11:05:00 UTC
[jira] [Commented] (LOG4J2-1852) Plugins lookup by package is not
compatible with Spring Boot jar packaging
[ https://issues.apache.org/jira/browse/LOG4J2-1852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16082052#comment-16082052 ]
Tanner Altares commented on LOG4J2-1852:
----------------------------------------
Is there any update or on this issue? As stated by the Spring Boot team using the JARURLConnection route could eliminate the need to modify the URL done by the ResolverUtil. A possible approach with limited modifications could be to overload the loadImplementationsInJar method to allow for a JarFile and do the needed matching tests. This should handle common packaging structures of jars/wars along with the nested approach for Spring Boot's packaging.
{code:java}
private void loadImplementationsInJar(ResolverUtil.Test test, String parent, JarFile jarFile) {
final Enumeration<JarEntry> entries = jarFile.entries();
while (entries.hasMoreElements()) {
JarEntry entry = entries.nextElement();
String name = entry.getName();
if (!entry.isDirectory() && name.startsWith(parent) && this.isTestApplicable(test, name)) {
this.addIfMatching(test, name);
}
}
}
{code}
> Plugins lookup by package is not compatible with Spring Boot jar packaging
> --------------------------------------------------------------------------
>
> Key: LOG4J2-1852
> URL: https://issues.apache.org/jira/browse/LOG4J2-1852
> Project: Log4j 2
> Issue Type: Bug
> Components: Plugins
> Affects Versions: 2.7
> Environment: Spring Boot 1.5.x, java 8
> Reporter: Maksym Novoseltsev
> Priority: Minor
>
> Here is you can find a description of the issue and pretty usefull answer from Spring Boot team regarding the very same issue:
> https://github.com/spring-projects/spring-boot/issues/8637
> Also you will find a sample project there that will help to reproduce issue.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)