We have Spring java-based web deployments which use log4j2.xml for logging messages to files, etc.
We now need to update our log4j2.xml configs in order to be able to do a ${web:contextPath} web lookup inside them so that we can use a deployment's context name as part of the log file's name which the loggers log messages to. However, when we deploy the apps, the log4j2 configurations fail to recognise any web lookup related stuff. The file created to log messages to is simply created with the name ${web
and no messages are actually logged in them.
I have read various docs online related to log4j2 web lookups when running in 3.0 servlets but I still can't see what the problem might be in our configurations. And I don't know what to look for in the log4j's trace logs in order to see what it is that we are missing.
Our Stack: Windows and Linux OSes Java 8 Tomcat 7.0.5x log4j-xxx 2.2 (log4j-api, log4j-core, log4j-web all in classpath)
Any help on how to get web lookups to work is much appreciated.
Cheers, PM
Aucun commentaire:
Enregistrer un commentaire