You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "NikolaSrica (via GitHub)" <gi...@apache.org> on 2025/04/14 22:45:20 UTC

[D] Custom rewrite appender not working when used like dependency on spring boot app [logging-log4j2]

GitHub user NikolaSrica created a discussion: Custom rewrite appender not working  when used like dependency on spring boot app

so I have a spring boot project that have his own log4j2.xml file inside resources and all is working fine ... i have the second project with the same setup but here I have a custom rewrite appender that is working fine when running that project. The problem appears when in the project A I have a dependency on project B and then the log4j2.xml is not loading correctly rewrite appender . What I need to add to log4j2.xml file so he can use the custom appender from imported project ? 

GitHub link: https://github.com/apache/logging-log4j2/discussions/3611

----
This is an automatically sent email for dev@logging.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@logging.apache.org


Re: [D] Custom rewrite appender not working when used like dependency on spring boot app [logging-log4j2]

Posted by "vy (via GitHub)" <gi...@apache.org>.
GitHub user vy added a comment to the discussion: Custom rewrite appender not working  when used like dependency on spring boot app

Project A has a dependency on Project B, which contains a custom appender, that you want to use in the `log4j2.xml` of Project A, right?
1. How do you package Project B? Is it just a regular library JAR?
2. How do you _import_ Project B into Project A? As a regular Maven/Gradle dependency?
3. You've read [Extending appenders](https://logging.apache.org/log4j/2.x/manual/appenders.html#extending) and using the [PluginProcessor](https://logging.apache.org/log4j/2.x/javadoc/log4j-core/org/apache/logging/log4j/core/config/plugins/processor/PluginProcessor.html) annotation processor while building the Project B, right?

GitHub link: https://github.com/apache/logging-log4j2/discussions/3611#discussioncomment-12854522

----
This is an automatically sent email for dev@logging.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@logging.apache.org