Я пытаюсь настроить Tomcat 9.0.19 с конфигурацией log4j, как упоминалось, но не работает
ЖУРНАЛ ОШИБКИ НИЖЕ
May 29, 2019 7:34:49 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
log4j:ERROR A "org.apache.log4j.RollingFileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [java.net.URLClassLoa der@54bedef2] whereas object of type
log4j:ERROR "org.apache.log4j.RollingFileAppender" was loaded by [ParallelWebappClassLoader
context: API
delegate: false
Parent Classloader:
java.net.URLClassLoader@54bedef2
].
log4j:ERROR Could not instantiate appender named "GEOLOCATION".
May 29, 2019 7:34:49 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
ШАГИ ПРОБОВАНЫ:
Мы загружаем два файла из дополнений в разделе загрузки tomcat
tomcat-juli.jar tomcat-juli-adapters.jar
Copy tomcat-juli.jar to $CATALINA_HOME\bin to replace old one
Copy tomcat-juli-adapters.jar to $CATALINA_HOME\lib
Download log4j lib and copy it to $CATALINA_HOME\libs.
Delete logging.properties in $CATALINA_HOME\conf
Create log4j.properties in $CATALINA_HOME\libs.
Download log4j version greater than 1.2 and copy to $CATALINA_HOME\lib
After that restart tomcat.