I am in the middle of upgrading the log4j from the existing version 1.2.17 to 2.17.0. For the log4j2 upgrade, I am using the JARS - log4j-api-2.17.0 and log4j-core-2.17.0. In the existing old code, the method removeAppender() is called from the org.apache.log4j.Category.removeAppender however, in the log4j2 I have observed that this method is moved under org.apache.logging.log4j.core.Logger. The problem here is, I am already using a couple of methods from the Logger class from the package org.apache.logging.log4j.Logger. When I try to import another Loggers class from the org.apache.logging.log4j.core.Logger, Eclipse is showing me the error "The import org.apache.logging.log4j.core.Logger collides with another import statement".
Please advise how can I call the removeAppender() from the org.apache.logging.log4j.core.Logger or am I referring to an incorrect package path/class to call the method removeAppender()?
Existing code to call removeAppender() -
perfAggregationLogger.removeAppender(perfLogAggregationDBAppenderName);
Also, I need suggestions on what JAR files I should be used to upgrade from Log4J1 to Log4j2.