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

Matt Sicker commented on LOG4J2-2690:
-------------------------------------

I don't remember if I have a specific overarching one, but my goals generally 
cover the following areas:
 * Make it easier to write and use plugins outside the "core" category.
 * Make it possible to use a log4j config file written for 1.x, 2.x, or 3.x, 
and have them all map to the same 3.x plugins (potentially with compatibility 
options if behavior has changed).
 * Core plugin annotations for configuration injection should be more flexible 
(e.g., in a builder class, it currently only supports using the fields; this 
could be enhanced to allow using setters/withers which can have additional 
validation code or whatever inside the method).
 * Add an ability for a configuration input to have types other than strings to 
more easily support configuration injection (this is relevant to JSON/YAML, but 
it becomes far more relevant in the proposed Groovy DSL where you can use 
native types for a lot of plugin options directly).
 * Reduce code duplication between different configuration factory 
implementations.
 ** Subsequently, this will allow for adding other file formats more easily.

Some other ideas that I haven't explored much of yet but sound potentially 
useful:
 * Make the Configuration class a plugin (it seems like it should logically 
work as one, but it would require a bit of overhaul to refactor into).
 * Support some sort of API bridge for plugins written for 1.x or 2.x (plugins 
for 2.x currently still work fine as is, though if we were to change anything 
about the various interfaces and classes they implement, that might introduce 
compatibility problems). I'm not sure to what extent this can be done that 
isn't already covered by existing features.
 * Provide plugin metadata in an API of some sort. This could be useful for 
generating a UI for configuring logging.
 * Provide better support for programmatic configuration. The existing Java 
builder API is nice, though if I could directly reference the plugin instances, 
that would make things a bit easier to customize dynamically. For example, if 
all (or most) of the core plugins are using builder classes, then I could 
potentially write my log4j config using those builder classes directly. This 
can be useful in microservice-style configurations where startup time is more 
important and a config can be created statically rather than dynamically.

Maybe I should create an epic around this?

> Custom appenders no longer found with Java 11
> ---------------------------------------------
>
>                 Key: LOG4J2-2690
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2690
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.12.1
>         Environment: Java 11.2
> {noformat}
> compile group: 'org.slf4j', name: 'slf4j-api', version: '1.8.0-beta4'
> compile 'org.apache.logging.log4j:log4j-slf4j18-impl:2.12.1'
> compile 'org.apache.logging.log4j:log4j-jcl:2.12.1'
> compile 'org.apache.logging.log4j:log4j-api:2.12.1'
> compile 'org.apache.logging.log4j:log4j-core:2.12.1'{noformat}
>            Reporter: Tobias Diez
>            Priority: Major
>
> After upgrading to Java 11, the custom appenders are no longer found. The 
> following errors are shown when running the app:
> {noformat}
> 2019-09-10 21:44:54,195 main ERROR Error processing element GuiAppender 
> ([Appenders: null]): CLASS_NOT_FOUND
> 2019-09-10 21:44:54,240 main ERROR Appenders contains an invalid element or 
> attribute "OurApplicationInsightsAppender"
> 2019-09-10 21:44:54,261 main ERROR Unable to locate appender 
> "applicationInsightsAppender" for logger config "root"
> 2019-09-10 21:44:54,262 main ERROR Unable to locate appender "GuiLogger" for 
> logger config "org.jabref"
> 2019-09-10 21:44:54,262 main ERROR Unable to locate appender "GuiLogger" for 
> logger config "org.apache.pdfbox"{noformat}
> The log4j config file can be found here:
> https://github.com/JabRef/jabref/blob/master/src/main/resources/log4j2.xml
> and the appender here:
> https://github.com/JabRef/jabref/blob/master/src/main/java/org/jabref/gui/logging/GuiAppender.java
> (They were working with Java 8, so it shouldn't be a configuration problem.)



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to