We have attempted to list the dependencies at http://logging.apache.org/log4j/2.x/runtime-dependencies.html <http://logging.apache.org/log4j/2.x/runtime-dependencies.html> and http://logging.apache.org/log4j/2.x/faq.html#which_jars <http://logging.apache.org/log4j/2.x/faq.html#which_jars>.
You need log4j-api and log4j-core for Log4j itself. If you are running in a web app then you would also need log4j-web. For bridging Log4j 1.x to Log4j 2 you need the log4j-1.2-api jar. For bridging commons logging to log4j 2 you need the commons logging jar + the log4j-jcl jar. For binding SLF4J to Log4j 2 you need the SLF4J API and the log4j-slf4j-impl jar. For java.util.logging you need the log4j-jul jar (and you will have to set a system property). You are currently routing all the logging to SLF4J. If you want you can continue to do that and simply remove log4j-1.2.17.jar and slf4j-log4j12-1.7.6.jar and replace them with the log4j-slf4j-impl, log4j-api and log4j-core jars (+ log4j-web in a servlet container). Ralph > On Nov 2, 2014, at 5:02 PM, Shawn Heisey <[email protected]> wrote: > > On 11/2/2014 12:57 PM, Ralph Goers wrote: >> 1. I would check bugzilla to see if anyone has reported this. I don’t >> recall seeing anything like it in the last 4 years. >> 2. Log4j 1.x is not actively maintained. Even if you find that it is a bug >> it is unlikely to ever be fixed. Upgrading to Log4j 2 is recommended. > > When I looked at the slf4j site, I could not see a binding for log4j2. > Digging deeper, it does appear that log4j2 itself might provide the > necessary functionality, but I am having some trouble figuring out > exactly which jars I need in order to handle everything. > > Solr uses slf4j for logging, and some of solr's dependencies require jcl > as well as java.util.logging, so those must be properly intercepted. > Solr itself has a few dependencies on log4j 1.x, mostly in the handling > of a Logging tab for the admin UI (one implementation watches log4j, the > other watches java.util.logging), but it seems that some util classes > also have a dependency. > > As I said in the original email, here's the jars I'm using now: > > jcl-over-slf4j-1.7.6.jar > jul-to-slf4j-1.7.6.jar > log4j-1.2.17.jar > 2014 slf4j-api-1.7.6.jar > slf4j-log4j12-1.7.6.jar > > Can you help me figure out a new set of jars to use version 2.1? I > guess I'll figure out at that point whether any source code changes are > required. It does appear that I will need a new configuration file, > because I don't see any non-xml config examples. > > Thanks, > Shawn > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
