IGNITE-16650 Migrate logging to log4j2. (#10152)

diff --git a/assembly/libs/README.txt b/assembly/libs/README.txt
index cdfd223..c907e01 100644
--- a/assembly/libs/README.txt
+++ b/assembly/libs/README.txt
@@ -75,7 +75,6 @@
 - ignite-indexing (for SQL querying and indexing)
 - ignite-jcl (for Apache Commons logging)
 - ignite-jta (for XA integration)
-- ignite-logj4 (for Log4j logging)
 - ignite-log4j2 (for Log4j 2 logging)
 - ignite-rest-http (for HTTP REST messages)
 - ignite-schedule (for Cron-based task scheduling)
diff --git a/assembly/release-base.xml b/assembly/release-base.xml
index df8598f..e3bdffe 100644
--- a/assembly/release-base.xml
+++ b/assembly/release-base.xml
@@ -43,11 +43,6 @@
         </file>
 
         <file>
-            <source>config/ignite-log4j2.xml</source>
-            <outputDirectory>/config</outputDirectory>
-        </file>
-
-        <file>
             <source>config/java.util.logging.properties</source>
             <outputDirectory>/config</outputDirectory>
         </file>
diff --git a/config/ignite-log4j.xml b/config/ignite-log4j.xml
index f53997d..ee4e268 100644
--- a/config/ignite-log4j.xml
+++ b/config/ignite-log4j.xml
@@ -17,134 +17,75 @@
   limitations under the License.
 -->
 
-<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN"
-    "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
+<Configuration monitorInterval="60">
+    <Appenders>
+        <Console name="CONSOLE" target="SYSTEM_OUT">
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}]%notEmpty{[%markerSimpleName]} %m%n"/>
+            <ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="ACCEPT"/>
+        </Console>
 
-<!--
-    Default log4j configuration for Ignite.
--->
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-    <!--
-        Logs System.out messages to console.
+        <Console name="CONSOLE_ERR" target="SYSTEM_ERR">
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}]%notEmpty{[%markerSimpleName]} %m%n"/>
+        </Console>
 
-        Note, this appender is disabled by default.
-        To enable, uncomment the section below and also CONSOLE appender in the <root> element.
-    -->
-    <!--
-    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-        <param name="Target" value="System.out"/>
+        <File name="CONSISTENCY" fileName="${sys:IGNITE_HOME}/work/log/consistency.log">
+            <PatternLayout>
+                <Pattern>"[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"</Pattern>
+            </PatternLayout>
+        </File>
 
-        <param name="Threshold" value="DEBUG"/>
+        <Routing name="FILE">
+            <Routes pattern="$${sys:nodeId}">
+                <Route>
+                    <RollingFile name="Rolling-${sys:nodeId}" fileName="${sys:IGNITE_HOME}/work/log/${sys:appId}-${sys:nodeId}.log"
+                                 filePattern="${sys:IGNITE_HOME}/work/log/${sys:appId}-${sys:nodeId}-%i-%d{yyyy-MM-dd}.log.gz">
+                        <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}]%notEmpty{[%markerSimpleName]} %m%n"/>
+                        <Policies>
+                            <TimeBasedTriggeringPolicy interval="6" modulate="true" />
+                            <SizeBasedTriggeringPolicy size="10 MB" />
+                        </Policies>
+                    </RollingFile>
+                </Route>
+            </Routes>
+        </Routing>
+    </Appenders>
 
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-
-        <filter class="org.apache.log4j.varia.LevelRangeFilter">
-            <param name="levelMin" value="DEBUG"/>
-            <param name="levelMax" value="WARN"/>
-        </filter>
-    </appender>
-    -->
-
-    <!--
-        Logs all ERROR messages to console.
-    -->
-    <appender name="CONSOLE_ERR" class="org.apache.log4j.ConsoleAppender">
-        <!-- Log to STDERR. -->
-        <param name="Target" value="System.err"/>
-
-        <!-- Log from ERROR and higher (change to WARN if needed). -->
-        <param name="Threshold" value="ERROR"/>
-
-        <!-- The default pattern: Date Priority [Category] Message\n -->
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
-
-    <!--
-        Logs all output to specified file.
-        By default, the logging goes to IGNITE_HOME/work/log folder
-    -->
-    <appender name="FILE" class="org.apache.ignite.logger.log4j.Log4jRollingFileAppender">
-        <param name="Threshold" value="DEBUG"/>
-        <param name="File" value="${IGNITE_HOME}/work/log/ignite.log"/>
-        <param name="Append" value="true"/>
-        <param name="MaxFileSize" value="10MB"/>
-        <param name="MaxBackupIndex" value="10"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
-
-    <!--
-    <category name="org.apache.ignite">
-        <level value="DEBUG"/>
-    </category>
-    -->
-
-    <!--
-        Uncomment to disable courtesy notices, such as SPI configuration
-        consistency warnings.
-    -->
-    <!--
-    <category name="org.apache.ignite.CourtesyConfigNotice">
-        <level value="OFF"/>
-    </category>
-    -->
-
-    <category name="org.springframework">
-        <level value="WARN"/>
-    </category>
-
-    <category name="org.eclipse.jetty">
-        <level value="WARN"/>
-    </category>
-
-    <!--
-        Avoid warnings about failed bind attempt when multiple nodes running on the same host.
-    -->
-    <category name="org.eclipse.jetty.util.log">
-        <level value="ERROR"/>
-    </category>
-
-    <category name="org.eclipse.jetty.util.component">
-        <level value="ERROR"/>
-    </category>
-
-    <category name="com.amazonaws">
-        <level value="WARN"/>
-    </category>
-
-    <!--
-        Consistency repair section.
-        Repaired data should not be logged to the same log file by default.
-    -->
-    <category name="org.apache.ignite.internal.visor.consistency" additivity="false">
-        <appender-ref ref="CONSISTENCY"/>
-        <level value="INFO"/>
-    </category>
-
-    <appender name="CONSISTENCY" class="org.apache.log4j.FileAppender">
-        <param name="File" value="${IGNITE_HOME}/work/log/consistency.log"/>
-        <param name="Append" value="true"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
-
-    <!-- Default settings. -->
-    <root>
-        <!-- Print out all info by default. -->
-        <level value="INFO"/>
-
-        <!-- Uncomment to enable logging to console. -->
+    <Loggers>
         <!--
-        <appender-ref ref="CONSOLE"/>
+        <Logger name="org.apache.ignite" level=DEBUG/>
         -->
 
-        <appender-ref ref="CONSOLE_ERR"/>
-        <appender-ref ref="FILE"/>
-    </root>
-</log4j:configuration>
+        <!--
+            Uncomment to disable courtesy notices, such as SPI configuration
+            consistency warnings.
+        -->
+        <!--
+        <Logger name="org.apache.ignite.CourtesyConfigNotice" level=OFF/>
+        -->
+
+        <Logger name="org.springframework" level="WARN"/>
+        <Logger name="org.eclipse.jetty" level="WARN"/>
+
+        <Logger name="org.apache.ignite.internal.visor.consistency" additivity="false" level="INFO">
+            <AppenderRef ref="CONSISTENCY"/>
+        </Logger>
+
+        <!--
+        Avoid warnings about failed bind attempt when multiple nodes running on the same host.
+        -->
+        <Logger name="org.eclipse.jetty.util.log" level="ERROR"/>
+        <Logger name="org.eclipse.jetty.util.component" level="ERROR"/>
+
+        <Logger name="com.amazonaws" level="WARN"/>
+
+        <Root level="INFO">
+            <!-- Uncomment to enable logging to console. -->
+            <!--
+            <AppenderRef ref="CONSOLE" level="DEBUG"/>
+            -->
+
+            <AppenderRef ref="CONSOLE_ERR" level="ERROR"/>
+            <AppenderRef ref="FILE" level="DEBUG"/>
+        </Root>
+    </Loggers>
+</Configuration>
diff --git a/docs/_docs/code-snippets/java/pom.xml b/docs/_docs/code-snippets/java/pom.xml
index e041102..10bd2fc 100644
--- a/docs/_docs/code-snippets/java/pom.xml
+++ b/docs/_docs/code-snippets/java/pom.xml
@@ -39,11 +39,6 @@
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
-            <version>${ignite.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
             <artifactId>ignite-jcl</artifactId>
             <version>${ignite.version}</version>
         </dependency>
diff --git a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/Logging.java b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/Logging.java
index e96998d..2f8e731 100644
--- a/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/Logging.java
+++ b/docs/_docs/code-snippets/java/src/main/java/org/apache/ignite/snippets/Logging.java
@@ -22,28 +22,10 @@
 import org.apache.ignite.Ignition;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.logger.jcl.JclLogger;
-import org.apache.ignite.logger.log4j.Log4JLogger;
 import org.apache.ignite.logger.log4j2.Log4J2Logger;
 import org.apache.ignite.logger.slf4j.Slf4jLogger;
 
 public class Logging {
-
-    void log4j() throws IgniteCheckedException {
-
-        // tag::log4j[]
-        IgniteConfiguration cfg = new IgniteConfiguration();
-
-        IgniteLogger log = new Log4JLogger("log4j-config.xml");
-
-        cfg.setGridLogger(log);
-
-        // Start a node.
-        try (Ignite ignite = Ignition.start(cfg)) {
-            ignite.log().info("Info Message Logged!");
-        }
-        // end::log4j[]
-    }
-
     void log4j2() throws IgniteCheckedException {
         // tag::log4j2[]
         IgniteConfiguration cfg = new IgniteConfiguration();
diff --git a/docs/_docs/code-snippets/xml/log4j-config.xml b/docs/_docs/code-snippets/xml/log4j-config.xml
deleted file mode 100644
index f8c1a37..0000000
--- a/docs/_docs/code-snippets/xml/log4j-config.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN"
-    "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
-    <!--
-        Logs all ERROR messages to console.
-    -->
-    <appender name="CONSOLE_ERR" class="org.apache.log4j.ConsoleAppender">
-        <!-- Log to STDERR. -->
-        <param name="Target" value="System.err"/>
-
-        <!-- Log from ERROR and higher (change to WARN if needed). -->
-        <param name="Threshold" value="ERROR"/>
-
-        <!-- The default pattern: Date Priority [Category] Message\n -->
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
-
-    <!--
-        Logs all output to specified file.
-        By default, the logging goes to IGNITE_HOME/work/log folder
-    -->
-    <appender name="FILE" class="org.apache.ignite.logger.log4j.Log4jRollingFileAppender">
-        <param name="Threshold" value="DEBUG"/>
-        <param name="File" value="${IGNITE_HOME}/work/log/ignite.log"/>
-        <param name="Append" value="true"/>
-        <param name="MaxFileSize" value="10MB"/>
-        <param name="MaxBackupIndex" value="10"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
-
-    <!--
-    <category name="org.apache.ignite">
-        <level value="DEBUG"/>
-    </category>
-    -->
-
-    <!--
-        Uncomment to disable courtesy notices, such as SPI configuration
-        consistency warnings.
-    -->
-    <!--
-    <category name="org.apache.ignite.CourtesyConfigNotice">
-        <level value="OFF"/>
-    </category>
-    -->
-
-    <category name="org.springframework">
-        <level value="WARN"/>
-    </category>
-
-    <category name="org.eclipse.jetty">
-        <level value="WARN"/>
-    </category>
-
-    <!--
-        Avoid warnings about failed bind attempt when multiple nodes running on the same host.
-    -->
-    <category name="org.eclipse.jetty.util.log">
-        <level value="ERROR"/>
-    </category>
-
-    <category name="org.eclipse.jetty.util.component">
-        <level value="ERROR"/>
-    </category>
-
-    <category name="com.amazonaws">
-        <level value="WARN"/>
-    </category>
-
-    <!-- Default settings. -->
-    <root>
-        <!-- Print out all info by default. -->
-        <level value="INFO"/>
-
-        <!-- Uncomment to enable logging to console. -->
-        <!--
-        <appender-ref ref="CONSOLE"/>
-        -->
-
-        <appender-ref ref="CONSOLE_ERR"/>
-        <appender-ref ref="FILE"/>
-    </root>
-</log4j:configuration>
diff --git a/docs/_docs/code-snippets/xml/log4j.xml b/docs/_docs/code-snippets/xml/log4j.xml
deleted file mode 100644
index fdb6203..0000000
--- a/docs/_docs/code-snippets/xml/log4j.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<!--
-    Ignite configuration with all defaults and enabled p2p deployment and enabled events.
--->
-<beans xmlns="http://www.springframework.org/schema/beans" xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="         http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans.xsd         http://www.springframework.org/schema/util         http://www.springframework.org/schema/util/spring-util.xsd">
-    <!-- tag::log4j[] -->
-    <bean class="org.apache.ignite.configuration.IgniteConfiguration" id="ignite.cfg">
-        <property name="gridLogger">
-            <bean class="org.apache.ignite.logger.log4j.Log4JLogger">
-                <!-- log4j configuration file -->
-                <constructor-arg type="java.lang.String" value="log4j-config.xml"/>
-            </bean>
-        </property>
-
-        <!-- other properties --> 
-
-        <!-- tag::discovery[] -->
-        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
-        <property name="discoverySpi">
-            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
-                <property name="ipFinder">
-                    <!--
-                        Ignite provides several options for automatic discovery that can be used
-                        instead os static IP based discovery. For information on all options refer
-                        to our documentation: http://apacheignite.readme.io/docs/cluster-config
-                    -->
-                    <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
-                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
-                        <!--bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"-->
-                        <property name="addresses">
-                            <list>
-                                <!-- In distributed environment, replace with actual host IP address. -->
-                                <value>127.0.0.1:47500..47509</value>
-                            </list>
-                        </property>
-                    </bean>
-                </property>
-            </bean>
-        </property>
-        <!-- end::discovery[] -->
-    </bean>
-    <!-- end::log4j[] -->
-</beans>
diff --git a/docs/_docs/extensions-and-integrations/ignite-for-spark/installation.adoc b/docs/_docs/extensions-and-integrations/ignite-for-spark/installation.adoc
index 05cdf64..730ec59 100644
--- a/docs/_docs/extensions-and-integrations/ignite-for-spark/installation.adoc
+++ b/docs/_docs/extensions-and-integrations/ignite-for-spark/installation.adoc
@@ -120,7 +120,7 @@
 
 [source, shell]
 ----
-spark.executor.extraClassPath /opt/ignite/libs/*:/opt/ignite/libs/optional/ignite-spark-ext/*:/opt/ignite/libs/optional/ignite-log4j/*:/opt/ignite/libs/optional/ignite-yarn-ext/*:/opt/ignite/libs/ignite-spring/*
+spark.executor.extraClassPath /opt/ignite/libs/*:/opt/ignite/libs/optional/ignite-spark-ext/*:/opt/ignite/libs/optional/ignite-log4j2/*:/opt/ignite/libs/optional/ignite-yarn-ext/*:/opt/ignite/libs/ignite-spring/*
 ----
 
 === Source Code Configuration
diff --git a/docs/_docs/extensions-and-integrations/ignite-for-spark/spark-shell.adoc b/docs/_docs/extensions-and-integrations/ignite-for-spark/spark-shell.adoc
index 37bcab6..25c21f4 100644
--- a/docs/_docs/extensions-and-integrations/ignite-for-spark/spark-shell.adoc
+++ b/docs/_docs/extensions-and-integrations/ignite-for-spark/spark-shell.adoc
@@ -70,7 +70,7 @@
 +
 [source, shell]
 ----
-./bin/spark-shell --jars path/to/ignite-core.jar,path/to/ignite-spark-ext.jar,path/to/cache-api.jar,path/to/ignite-log4j.jar,path/to/log4j.jar --master spark://master_host:master_port
+./bin/spark-shell --jars path/to/ignite-core.jar,path/to/ignite-spark-ext.jar,path/to/cache-api.jar,path/to/ignite-log4j2.jar,path/to/log4j.jar --master spark://master_host:master_port
 ----
 
 You should see Spark shell started up.
diff --git a/docs/_docs/extensions-and-integrations/ignite-for-spark/troubleshooting.adoc b/docs/_docs/extensions-and-integrations/ignite-for-spark/troubleshooting.adoc
index f083081..2072d30 100644
--- a/docs/_docs/extensions-and-integrations/ignite-for-spark/troubleshooting.adoc
+++ b/docs/_docs/extensions-and-integrations/ignite-for-spark/troubleshooting.adoc
@@ -20,4 +20,4 @@
 
 *  I am getting `java.lang.ClassNotFoundException` `org.apache.ignite.logger.java.JavaLoggerFileHandler` when using IgniteContext
 
-This issue appears when you do not have any loggers included in classpath and Ignite tries to use standard Java logging. By default Spark loads all user jar files using separate class loader. Java logging framework, on the other hand, uses application class loader to initialize log handlers. To resolve this, you can either add `ignite-log4j` module to the list of the used jars so that Ignite would use Log4j as a logging subsystem, or alter default Spark classpath as described link:ignite-for-spark/installation[here].
+This issue appears when you do not have any loggers included in classpath and Ignite tries to use standard Java logging. By default Spark loads all user jar files using separate class loader. Java logging framework, on the other hand, uses application class loader to initialize log handlers. To resolve this, you can either add `ignite-log4j2` module to the list of the used jars so that Ignite would use Log4j2 as a logging subsystem, or alter default Spark classpath as described link:ignite-for-spark/installation[here].
diff --git a/docs/_docs/installation/installing-using-docker.adoc b/docs/_docs/installation/installing-using-docker.adoc
index b0e1650..b84775c 100644
--- a/docs/_docs/installation/installing-using-docker.adoc
+++ b/docs/_docs/installation/installing-using-docker.adoc
@@ -188,7 +188,7 @@
 
 By default, the Ignite Docker image starts with the following modules enabled:
 
-- ignite-log4j,
+- ignite-log4j2,
 - ignite-spring,
 - ignite-indexing.
 
@@ -202,7 +202,7 @@
 | `CONFIG_URI` | URL to the Ignite configuration file (can also be relative to the META-INF folder on the class path).
 The downloaded config file is saved to ./ignite-config.xml | N/A
 
-| `OPTION_LIBS` | A list of link:setup#enabling-modules[modules] that will be enabled for the node. | ignite-log4j, ignite-spring, ignite-indexing
+| `OPTION_LIBS` | A list of link:setup#enabling-modules[modules] that will be enabled for the node. | ignite-log4j2, ignite-spring, ignite-indexing
 
 | `JVM_OPTS` | JVM arguments passed to the Ignite instance.| N/A
 
diff --git a/docs/_docs/logging.adoc b/docs/_docs/logging.adoc
index 48c67b6..0928261 100644
--- a/docs/_docs/logging.adoc
+++ b/docs/_docs/logging.adoc
@@ -19,7 +19,6 @@
 Ignite supports a number of logging libraries and frameworks:
 
 - JUL (default),
-- Log4j,
 - Log4j2,
 - JCL,
 - SLF4J.
@@ -49,40 +48,6 @@
 If you use Ignite as a library in your application, the default logging configuration includes only console handler at INFO level.
 You can provide a custom configuration file via the `java.util.logging.config.file` system property.
 
-== Using Log4j
-
-[CAUTION]
-====
-[discrete]
-The ignite-log4j module is deprecated and will be removed in the next releases.
-Log4j 1.x had link:https://blogs.apache.org/foundation/entry/apache_logging_services_project_announces[reached end of life] and contains critical vulnerabilities.
-Use link:logging#using-log4j2[ignite-log4j2] module instead.
-====
-
-NOTE: Before using Log4j, enable the link:setup#enabling-modules[ignite-log4j] module.
-
-To enable Log4j logger, set the `gridLogger` property of `IgniteConfiguration`, as shown in the following example:
-
-:javaFile: {javaCodeDir}/Logging.java
-
-[tabs]
---
-tab:XML[]
-[source,xml]
-----
-include::code-snippets/xml/log4j.xml[tags=log4j;!discovery, indent=0]
-----
-tab:Java[]
-[source,java]
-----
-include::{javaFile}[tag=log4j, indent=0]
-----
-tab:.NET[unsupported]
-tab:C++[unsupported]
---
-
-In the above example, the path to `log4j-config.xml` can be either an absolute path, a local path relative to META-INF in classpath or to `IGNITE_HOME`. An example log4j configuration file can be found in the distribution package (`$IGNITE_HOME/config/ignite-log4j.xml`).
-
 == Using Log4j2
 NOTE: Before using Log4j2, enable the link:setup#enabling-modules[ignite-log4j2] module.
 
@@ -108,14 +73,14 @@
 tab:C++[unsupported]
 --
 
-In the above example, the path to `log4j2-config.xml` can be either an absolute path, a local path relative to META-INF in classpath or to `IGNITE_HOME`. An example log4j2 configuration file can be found in the distribution package (`$IGNITE_HOME/config/ignite-log4j2.xml`).
+In the above example, the path to `log4j2-config.xml` can be either an absolute path, a local path relative to META-INF in classpath or to `IGNITE_HOME`. An example log4j2 configuration file can be found in the distribution package (`$IGNITE_HOME/config/ignite-log4j.xml`).
 
 NOTE: Log4j2 supports runtime reconfiguration, i.e. changes in the configuration file is applied without the need to restart the application.
 
 == Using JCL
 NOTE: Before using JCL, enable the link:setup#enabling-modules[ignite-jcl] module.
 
-NOTE: Note that JCL simply forwards logging messages to an underlying logging system, which needs to be properly configured. Refer to the link:https://commons.apache.org/proper/commons-logging/guide.html#Configuration[JCL official documentation] for more information. For example, if you want to use Log4j, make sure you add the required libraries to your classpath.
+NOTE: Note that JCL simply forwards logging messages to an underlying logging system, which needs to be properly configured. Refer to the link:https://commons.apache.org/proper/commons-logging/guide.html#Configuration[JCL official documentation] for more information. For example, if you want to use Log4j2, make sure you add the required libraries to your classpath.
 
 To enable Log4j2 logger, set the `gridLogger` property of `IgniteConfiguration`, as shown below:
 
@@ -182,9 +147,9 @@
 
 The following steps guide you through the process of configuring logging. This should be suitable for most cases.
 
-. Use either Log4j or Log4j2 as the logging framework. To enable it, follow the instructions provided in the corresponding section above.
-. If you use the default configuration file (either `ignite-log4j.xml` or `ignite-log4j2.xml`), uncomment the CONSOLE appender.
-. In the log4j configuration file, set the path to the log file. The default location is `${IGNITE_HOME}/work/log/ignite.log`.
+. To enable Log4j2, follow the instructions provided in the corresponding section above.
+. If you use the default configuration file (`ignite-log4j.xml`), uncomment the CONSOLE appender.
+. In the log4j2 configuration file, set the path to the log file. The default location is `${IGNITE_HOME}/work/log/ignite.log`.
 . Start the nodes in verbose mode:
    - If you use `ignite.sh` to start nodes, specify the `-v` option.
    - If you start nodes from Java code, use the `IGNITE_QUIET=false` system variable.
diff --git a/docs/_docs/setup.adoc b/docs/_docs/setup.adoc
index fcbc2ad..13e2eb7 100644
--- a/docs/_docs/setup.adoc
+++ b/docs/_docs/setup.adoc
@@ -214,8 +214,6 @@
 
 |ignite-kubernetes | Ignite Kubernetes module provides a TCP Discovery IP Finder that uses a dedicated Kubernetes service for IP addresses lookup of Ignite pods containerized by Kubernetes.
 
-|ignite-log4j |Support for Log4j
-
 |ignite-log4j2 |Support for Log4j2
 
 
diff --git a/examples/pom-standalone-lgpl.xml b/examples/pom-standalone-lgpl.xml
index 23ab8d6..2499ad5 100644
--- a/examples/pom-standalone-lgpl.xml
+++ b/examples/pom-standalone-lgpl.xml
@@ -69,7 +69,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
             <version>to_be_replaced_by_ignite_version</version>
         </dependency>
 
diff --git a/examples/pom-standalone.xml b/examples/pom-standalone.xml
index 23ab8d6..2499ad5 100644
--- a/examples/pom-standalone.xml
+++ b/examples/pom-standalone.xml
@@ -69,7 +69,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
             <version>to_be_replaced_by_ignite_version</version>
         </dependency>
 
diff --git a/examples/pom.xml b/examples/pom.xml
index 5eb93fc..488478c 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -71,7 +71,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
         </dependency>
 
         <dependency>
diff --git a/modules/calcite/pom.xml b/modules/calcite/pom.xml
index acaaee4..5527715 100644
--- a/modules/calcite/pom.xml
+++ b/modules/calcite/pom.xml
@@ -181,15 +181,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>${slf4j.version}</version>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/logical/ScriptTestRunner.java b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/logical/ScriptTestRunner.java
index 9f7afdf..24899ef 100644
--- a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/logical/ScriptTestRunner.java
+++ b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/logical/ScriptTestRunner.java
@@ -61,7 +61,7 @@
 
     static {
         try {
-            log = new GridTestLog4jLogger(U.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml"));
+            log = new GridTestLog4jLogger(U.resolveIgnitePath("modules/core/src/test/config/log4j2-test.xml"));
         }
         catch (Exception e) {
             e.printStackTrace(System.err);
diff --git a/modules/cassandra/store/pom.xml b/modules/cassandra/store/pom.xml
index 0fd18e7..f447ff7 100644
--- a/modules/cassandra/store/pom.xml
+++ b/modules/cassandra/store/pom.xml
@@ -62,7 +62,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
             <scope>test</scope>
         </dependency>
 
@@ -150,16 +150,16 @@
             </exclusions>
         </dependency>
 
-        <!-- Apache log4j -->
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
             <scope>test</scope>
         </dependency>
 
         <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>ignite-core</artifactId>
+            <type>test-jar</type>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraDirectPersistenceLoadTest.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraDirectPersistenceLoadTest.java
index c031bfb..48f85c3 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraDirectPersistenceLoadTest.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraDirectPersistenceLoadTest.java
@@ -25,7 +25,8 @@
 import org.apache.ignite.tests.utils.CacheStoreHelper;
 import org.apache.ignite.tests.utils.CassandraHelper;
 import org.apache.ignite.tests.utils.TestsHelper;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 /**
  * Load tests for {@link org.apache.ignite.cache.store.cassandra.CassandraCacheStore} implementation of
@@ -33,7 +34,7 @@
  */
 public class CassandraDirectPersistenceLoadTest extends LoadTestDriver {
     /** */
-    private static final Logger LOGGER = Logger.getLogger("CassandraLoadTests");
+    private static final Logger LOGGER = LogManager.getLogger("CassandraLoadTests");
 
     /**
      *
@@ -101,7 +102,7 @@
             TestsHelper.getLoadTestsCacheName(),
             TestsHelper.getLoadTestsPersistenceSettings(),
             CassandraHelper.getAdminDataSrc(),
-            Logger.getLogger(logName));
+            LogManager.getLogger(logName));
     }
 
 }
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraDirectPersistenceTest.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraDirectPersistenceTest.java
index 8a5babb..0bc33677 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraDirectPersistenceTest.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraDirectPersistenceTest.java
@@ -35,7 +35,8 @@
 import org.apache.ignite.tests.utils.TestTransaction;
 import org.apache.ignite.tests.utils.TestsHelper;
 import org.apache.ignite.transactions.Transaction;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -47,7 +48,7 @@
  */
 public class CassandraDirectPersistenceTest {
     /** */
-    private static final Logger LOGGER = Logger.getLogger(CassandraDirectPersistenceTest.class.getName());
+    private static final Logger LOGGER = LogManager.getLogger(CassandraDirectPersistenceTest.class.getName());
 
     /** */
     @BeforeClass
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraLocalServer.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraLocalServer.java
index eea4e9e..a229d95 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraLocalServer.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/CassandraLocalServer.java
@@ -18,14 +18,15 @@
 package org.apache.ignite.tests;
 
 import org.apache.ignite.tests.utils.CassandraHelper;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 /**
  * Simple helper class to run Cassandra on localhost
  */
 public class CassandraLocalServer {
     /** */
-    private static final Logger LOGGER = Logger.getLogger(CassandraLocalServer.class.getName());
+    private static final Logger LOGGER = LogManager.getLogger(CassandraLocalServer.class.getName());
 
     /** */
     public static void main(String[] args) {
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStoreLoadTest.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStoreLoadTest.java
index bfcf751..9a759bc 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStoreLoadTest.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStoreLoadTest.java
@@ -26,7 +26,8 @@
 import org.apache.ignite.tests.load.ignite.WriteWorker;
 import org.apache.ignite.tests.utils.CassandraHelper;
 import org.apache.ignite.tests.utils.TestsHelper;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 /**
  * Load tests for Ignite caches which utilizing {@link org.apache.ignite.cache.store.cassandra.CassandraCacheStore}
@@ -34,7 +35,7 @@
  */
 public class IgnitePersistentStoreLoadTest extends LoadTestDriver {
     /** */
-    private static final Logger LOGGER = Logger.getLogger("IgniteLoadTests");
+    private static final Logger LOGGER = LogManager.getLogger("IgniteLoadTests");
 
     /**
      * test starter.
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStorePrimitiveTest.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStorePrimitiveTest.java
index 5b0e88a..5b2799a 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStorePrimitiveTest.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStorePrimitiveTest.java
@@ -31,7 +31,8 @@
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.tests.utils.CassandraAdminCredentials;
 import org.apache.ignite.tests.utils.CassandraHelper;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -44,7 +45,7 @@
  */
 public class IgnitePersistentStorePrimitiveTest {
     /** */
-    private static final Logger LOGGER = Logger.getLogger(IgnitePersistentStorePrimitiveTest.class.getName());
+    private static final Logger LOGGER = LogManager.getLogger(IgnitePersistentStorePrimitiveTest.class.getName());
 
     /** */
     @BeforeClass
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStoreTest.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStoreTest.java
index 8678875..1aeade5 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStoreTest.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/IgnitePersistentStoreTest.java
@@ -52,7 +52,8 @@
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
@@ -65,7 +66,7 @@
  */
 public class IgnitePersistentStoreTest {
     /** */
-    private static final Logger LOGGER = Logger.getLogger(IgnitePersistentStoreTest.class.getName());
+    private static final Logger LOGGER = LogManager.getLogger(IgnitePersistentStoreTest.class.getName());
 
     /** */
     @BeforeClass
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/load/LoadTestDriver.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/load/LoadTestDriver.java
index bbe9f18..a244da1 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/load/LoadTestDriver.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/load/LoadTestDriver.java
@@ -24,7 +24,7 @@
 import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.cache.store.cassandra.common.SystemHelper;
 import org.apache.ignite.tests.utils.TestsHelper;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.Logger;
 
 /**
  * Basic load test driver to be inherited by specific implementation for particular use-case.
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/load/Worker.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/load/Worker.java
index 9a69eb8..0aa20c0 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/load/Worker.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/load/Worker.java
@@ -31,7 +31,8 @@
 import org.apache.ignite.internal.processors.cache.CacheEntryImpl;
 import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.tests.utils.TestsHelper;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 /**
  * Worker thread abstraction to be inherited by specific load test implementation
@@ -97,7 +98,7 @@
     /** */
     public Worker(CacheStore cacheStore, long startPosition, long endPosition) {
         this.cacheStore = cacheStore;
-        this.log = Logger.getLogger(loggerName());
+        this.log = LogManager.getLogger(loggerName());
         this.startPosition = startPosition;
         this.endPosition = endPosition;
     }
@@ -105,7 +106,7 @@
     /** */
     public Worker(Ignite ignite, long startPosition, long endPosition) {
         this.ignite = ignite;
-        this.log = Logger.getLogger(loggerName());
+        this.log = LogManager.getLogger(loggerName());
         this.startPosition = startPosition;
         this.endPosition = endPosition;
     }
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/utils/CacheStoreHelper.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/utils/CacheStoreHelper.java
index ddfa111..bf996cd 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/utils/CacheStoreHelper.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/utils/CacheStoreHelper.java
@@ -23,8 +23,9 @@
 import org.apache.ignite.cache.store.cassandra.CassandraCacheStore;
 import org.apache.ignite.cache.store.cassandra.datasource.DataSource;
 import org.apache.ignite.cache.store.cassandra.persistence.KeyValuePersistenceSettings;
-import org.apache.ignite.logger.log4j.Log4JLogger;
-import org.apache.log4j.Logger;
+import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.springframework.core.io.Resource;
 
 /**
@@ -32,7 +33,7 @@
  */
 public class CacheStoreHelper {
     /** */
-    private static final Logger LOGGER = Logger.getLogger(CacheStoreHelper.class.getName());
+    private static final Logger LOGGER = LogManager.getLogger(CacheStoreHelper.class.getName());
 
     /** */
     public static CacheStore createCacheStore(String cacheName, Resource persistenceSettings, DataSource conn) {
@@ -66,7 +67,7 @@
             logField.setAccessible(true);
 
             sesField.set(cacheStore, session != null ? session : new TestCacheSession(cacheName));
-            logField.set(cacheStore, new Log4JLogger(log));
+            logField.set(cacheStore, new GridTestLog4jLogger(log));
         }
         catch (Throwable e) {
             throw new RuntimeException("Failed to initialize test Ignite cache store", e);
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/utils/CassandraHelper.java b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/utils/CassandraHelper.java
index 8a9934a..559294a 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/tests/utils/CassandraHelper.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/tests/utils/CassandraHelper.java
@@ -34,8 +34,8 @@
 import org.apache.ignite.cache.store.cassandra.session.pool.SessionPool;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lifecycle.LifecycleEventType;
-import org.apache.ignite.logger.log4j.Log4JLogger;
-import org.apache.log4j.Logger;
+import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger;
+import org.apache.logging.log4j.Logger;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -346,7 +346,7 @@
         try {
             Field logField = CassandraLifeCycleBean.class.getDeclaredField("log");
             logField.setAccessible(true);
-            logField.set(embeddedCassandraBean, new Log4JLogger(log));
+            logField.set(embeddedCassandraBean, new GridTestLog4jLogger(log));
         }
         catch (Throwable e) {
             throw new RuntimeException("Failed to initialize logger for CassandraLifeCycleBean", e);
diff --git a/modules/cassandra/store/src/test/java/org/apache/ignite/testsuites/cassandra/store/IgniteCassandraStoreTestSuite.java b/modules/cassandra/store/src/test/java/org/apache/ignite/testsuites/cassandra/store/IgniteCassandraStoreTestSuite.java
index da40457..deeb129 100644
--- a/modules/cassandra/store/src/test/java/org/apache/ignite/testsuites/cassandra/store/IgniteCassandraStoreTestSuite.java
+++ b/modules/cassandra/store/src/test/java/org/apache/ignite/testsuites/cassandra/store/IgniteCassandraStoreTestSuite.java
@@ -26,7 +26,8 @@
 import org.apache.ignite.tests.IgnitePersistentStoreTest;
 import org.apache.ignite.tests.utils.CassandraHelper;
 import org.apache.ignite.tools.junit.JUnitTeamcityReporter;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.runner.RunWith;
@@ -49,7 +50,7 @@
     IgnitePersistentStorePrimitiveTest.class})
 public class IgniteCassandraStoreTestSuite {
     /** */
-    private static final Logger LOGGER = Logger.getLogger(IgniteCassandraStoreTestSuite.class.getName());
+    private static final Logger LOGGER = LogManager.getLogger(IgniteCassandraStoreTestSuite.class.getName());
 
     /** */
     @BeforeClass
diff --git a/modules/cassandra/store/src/test/resources/log4j.properties b/modules/cassandra/store/src/test/resources/log4j.properties
deleted file mode 100644
index 9c67be4..0000000
--- a/modules/cassandra/store/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,119 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Root logger option
-log4j.rootLogger=INFO, stdout
-
-# Direct log messages to stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
-
-# ------ LOAD TESTS LOGGING ------
-
-# Cassandra load tests loggers
-log4j.logger.CassandraLoadTests=INFO, stdout, cassandraLoadTests
-log4j.logger.CassandraWriteLoadTest=INFO, csWrite
-log4j.logger.CassandraBulkWriteLoadTest=INFO, csBulkWrite
-log4j.logger.CassandraReadLoadTest=INFO, csRead
-log4j.logger.CassandraBulkReadLoadTest=INFO, csBulkRead
-
-log4j.appender.cassandraLoadTests=org.apache.log4j.RollingFileAppender
-log4j.appender.cassandraLoadTests.File=logs/cassandra-load-tests.log
-log4j.appender.cassandraLoadTests.MaxFileSize=10MB
-log4j.appender.cassandraLoadTests.MaxBackupIndex=10
-log4j.appender.cassandraLoadTests.Append=true
-log4j.appender.cassandraLoadTests.layout=org.apache.log4j.PatternLayout
-log4j.appender.cassandraLoadTests.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
-
-log4j.appender.csWrite=org.apache.log4j.RollingFileAppender
-log4j.appender.csWrite.File=logs/cassandra-write.log
-log4j.appender.csWrite.MaxFileSize=10MB
-log4j.appender.csWrite.MaxBackupIndex=10
-log4j.appender.csWrite.Append=true
-log4j.appender.csWrite.layout=org.apache.log4j.PatternLayout
-log4j.appender.csWrite.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
-
-log4j.appender.csBulkWrite=org.apache.log4j.RollingFileAppender
-log4j.appender.csBulkWrite.File=logs/cassandra-bulk-write.log
-log4j.appender.csBulkWrite.MaxFileSize=10MB
-log4j.appender.csBulkWrite.MaxBackupIndex=10
-log4j.appender.csBulkWrite.Append=true
-log4j.appender.csBulkWrite.layout=org.apache.log4j.PatternLayout
-log4j.appender.csBulkWrite.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
-
-log4j.appender.csRead=org.apache.log4j.RollingFileAppender
-log4j.appender.csRead.File=logs/cassandra-read.log
-log4j.appender.csRead.MaxFileSize=10MB
-log4j.appender.csRead.MaxBackupIndex=10
-log4j.appender.csRead.Append=true
-log4j.appender.csRead.layout=org.apache.log4j.PatternLayout
-log4j.appender.csRead.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
-
-log4j.appender.csBulkRead=org.apache.log4j.RollingFileAppender
-log4j.appender.csBulkRead.File=logs/cassandra-bulk-read.log
-log4j.appender.csBulkRead.MaxFileSize=10MB
-log4j.appender.csBulkRead.MaxBackupIndex=10
-log4j.appender.csBulkRead.Append=true
-log4j.appender.csBulkRead.layout=org.apache.log4j.PatternLayout
-log4j.appender.csBulkRead.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
-
-# Ignite load tests loggers
-log4j.logger.IgniteLoadTests=INFO, stdout, igniteLoadTests
-log4j.logger.IgniteWriteLoadTest=INFO, igWrite
-log4j.logger.IgniteBulkWriteLoadTest=INFO, igBulkWrite
-log4j.logger.IgniteReadLoadTest=INFO, igRead
-log4j.logger.IgniteBulkReadLoadTest=INFO, igBulkRead
-
-log4j.appender.igniteLoadTests=org.apache.log4j.RollingFileAppender
-log4j.appender.igniteLoadTests.File=logs/ignite-load-tests.log
-log4j.appender.igniteLoadTests.MaxFileSize=10MB
-log4j.appender.igniteLoadTests.MaxBackupIndex=10
-log4j.appender.igniteLoadTests.Append=true
-log4j.appender.igniteLoadTests.layout=org.apache.log4j.PatternLayout
-log4j.appender.igniteLoadTests.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
-
-log4j.appender.igWrite=org.apache.log4j.RollingFileAppender
-log4j.appender.igWrite.File=logs/ignite-write.log
-log4j.appender.igWrite.MaxFileSize=10MB
-log4j.appender.igWrite.MaxBackupIndex=10
-log4j.appender.igWrite.Append=true
-log4j.appender.igWrite.layout=org.apache.log4j.PatternLayout
-log4j.appender.igWrite.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
-
-log4j.appender.igBulkWrite=org.apache.log4j.RollingFileAppender
-log4j.appender.igBulkWrite.File=logs/ignite-bulk-write.log
-log4j.appender.igBulkWrite.MaxFileSize=10MB
-log4j.appender.igBulkWrite.MaxBackupIndex=10
-log4j.appender.igBulkWrite.Append=true
-log4j.appender.igBulkWrite.layout=org.apache.log4j.PatternLayout
-log4j.appender.igBulkWrite.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
-
-log4j.appender.igRead=org.apache.log4j.RollingFileAppender
-log4j.appender.igRead.File=logs/ignite-read.log
-log4j.appender.igRead.MaxFileSize=10MB
-log4j.appender.igRead.MaxBackupIndex=10
-log4j.appender.igRead.Append=true
-log4j.appender.igRead.layout=org.apache.log4j.PatternLayout
-log4j.appender.igRead.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
-
-log4j.appender.igBulkRead=org.apache.log4j.RollingFileAppender
-log4j.appender.igBulkRead.File=logs/ignite-bulk-read.log
-log4j.appender.igBulkRead.MaxFileSize=10MB
-log4j.appender.igBulkRead.MaxBackupIndex=10
-log4j.appender.igBulkRead.Append=true
-log4j.appender.igBulkRead.layout=org.apache.log4j.PatternLayout
-log4j.appender.igBulkRead.layout.ConversionPattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
diff --git a/modules/cassandra/store/src/test/resources/log4j2.properties b/modules/cassandra/store/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..9e79b91
--- /dev/null
+++ b/modules/cassandra/store/src/test/resources/log4j2.properties
@@ -0,0 +1,178 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+rootLogger.level=info
+rootLogger.appenderRef.$1.ref=stdout
+
+# Direct log messages to stdout
+appender.stdout.name=stdout
+appender.stdout.type=Console
+appender.stdout.target=SYSTEM_OUT
+appender.stdout.layout.type=PatternLayout
+appender.stdout.layout.pattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
+
+# ------ LOAD TESTS LOGGING ------
+
+# Cassandra load tests loggers
+logger.CassandraLoadTests.name=CassandraLoadTests
+logger.CassandraLoadTests.level=INFO
+logger.CassandraLoadTests.appenderRef.$1.ref=stdout
+logger.CassandraLoadTests.appenderRef.$2.ref=cassandraLoadTests
+
+logger.CassandraWriteLoadTest.name=CassandraWriteLoadTest
+logger.CassandraWriteLoadTest.level=INFO
+logger.CassandraWriteLoadTest.appenderRef.$1.ref=csWrite
+
+logger.CassandraBulkWriteLoadTest.name=CassandraBulkWriteLoadTest
+logger.CassandraBulkWriteLoadTest.level=INFO
+logger.CassandraBulkWriteLoadTest.appenderRef.$1.ref =csBulkWrite
+
+logger.CassandraReadLoadTest.name=CassandraReadLoadTest
+logger.CassandraReadLoadTest.level=INFO
+logger.CassandraReadLoadTest.appenderRef.$1.ref=csRead
+
+logger.CassandraBulkReadLoadTest.name=CassandraBulkReadLoadTest
+logger.CassandraBulkReadLoadTest.level=INFO
+logger.CassandraBulkReadLoadTest.appenderRef.$1.ref=csRead
+
+appender.csWrite.type=RollingFile
+appender.csWrite.name=csWrite
+appender.csWrite.fileName=logs/cassandra-write.log
+appender.csWrite.filePattern=logs/cassandra-write.log%i
+appender.csWrite.policies.type=SizeBasedTriggeringPolicy
+appender.csWrite.policies.size=10MB
+appender.csWrite.strategy.type=DefaultRolloverStrategy
+appender.csWrite.strategy.max=10
+appender.csWrite.append=true
+appender.csWrite.layout.type=PatternLayout
+appender.csWrite.layout.pattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
+
+appender.csBulkWrite.type=RollingFile
+appender.csBulkWrite.name=csBulkWrite
+appender.csBulkWrite.fileName=logs/cassandra-bulk-write.log
+appender.csBulkWrite.filePattern=logs/cassandra-bulk-write.log%i
+appender.csBulkWrite.policies.type=SizeBasedTriggeringPolicy
+appender.csBulkWrite.policies.size=10MB
+appender.csBulkWrite.strategy.type=DefaultRolloverStrategy
+appender.csBulkWrite.strategy.max=10
+appender.csBulkWrite.append=true
+appender.csBulkWrite.layout.type=PatternLayout
+appender.csBulkWrite.layout.pattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
+
+appender.csRead.type=RollingFile
+appender.csRead.name=csRead
+appender.csRead.fileName=logs/cassandra-read.log
+appender.csRead.filePattern=logs/cassandra-read.log%i
+appender.csRead.policies.type=SizeBasedTriggeringPolicy
+appender.csRead.policies.size=10MB
+appender.csRead.strategy.type=DefaultRolloverStrategy
+appender.csRead.strategy.max=10
+appender.csRead.append=true
+appender.csRead.layout.type=PatternLayout
+appender.csRead.layout.pattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
+
+appender.csBulkRead.type=RollingFile
+appender.csBulkRead.name=csBulkRead
+appender.csBulkRead.fileName=logs/cassandra-bulk-read.log
+appender.csBulkRead.filePattern=logs/cassandra-bulk-read.log%i
+appender.csBulkRead.policies.type=SizeBasedTriggeringPolicy
+appender.csBulkRead.policies.size=10MB
+appender.csBulkRead.strategy.type=DefaultRolloverStrategy
+appender.csBulkRead.strategy.max=10
+appender.csBulkRead.append=true
+appender.csBulkRead.layout.type=PatternLayout
+appender.csBulkRead.layout.pattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
+
+# Ignite load tests loggers
+logger.IgniteLoadTests.name=CassandraLoadTests
+logger.IgniteLoadTests.level=INFO
+logger.IgniteLoadTests.appenderRef.$1.ref=stdout
+logger.IgniteLoadTests.appenderRef.$2.ref=igniteLoadTests
+
+logger.IgniteWriteLoadTest.name=CassandraWriteLoadTest
+logger.IgniteWriteLoadTest.level=INFO
+logger.IgniteWriteLoadTest.appenderRef.$1.ref=igWrite
+
+logger.IgniteBulkWriteLoadTest.name=CassandraBulkWriteLoadTest
+logger.IgniteBulkWriteLoadTest.level=INFO
+logger.IgniteBulkWriteLoadTest.appenderRef.$1.ref=igBulkWrite
+
+logger.IgniteReadLoadTest.name=CassandraReadLoadTest
+logger.IgniteReadLoadTest.level=INFO
+logger.IgniteReadLoadTest.appenderRef.$1.ref=igRead
+
+logger.IgniteBulkReadLoadTest.name=CassandraBulkReadLoadTest
+logger.IgniteBulkReadLoadTest.level=INFO
+logger.IgniteBulkReadLoadTest.appenderRef.$1.ref=igBulkRead
+
+appender.igniteLoadTests.type=RollingFile
+appender.igniteLoadTests.name=igniteLoadTests
+appender.igniteLoadTests.fileName=logs/ignite-load-tests.log
+appender.igniteLoadTests.filePattern=logs/ignite-load-tests.log%i
+appender.igniteLoadTests.policies.type=SizeBasedTriggeringPolicy
+appender.igniteLoadTests.policies.size=10MB
+appender.igniteLoadTests.strategy.type=DefaultRolloverStrategy
+appender.igniteLoadTests.strategy.max=10
+appender.igniteLoadTests.append=true
+appender.igniteLoadTests.layout.type=PatternLayout
+appender.igniteLoadTests.layout.pattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
+
+appender.igWrite.type=RollingFile
+appender.igWrite.name=igWrite
+appender.igWrite.fileName=logs/ignite-write.log
+appender.igWrite.filePattern=logs/ignite-write.log%i
+appender.igWrite.policies.type=SizeBasedTriggeringPolicy
+appender.igWrite.policies.size=10MB
+appender.igWrite.strategy.type=DefaultRolloverStrategy
+appender.igWrite.strategy.max=10
+appender.igWrite.append=true
+appender.igWrite.layout.type=PatternLayout
+appender.igWrite.layout.pattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
+
+appender.igBulkWrite.type=RollingFile
+appender.igBulkWrite.name=igBulkWrite
+appender.igBulkWrite.fileName=logs/ignite-bulk-write.log
+appender.igBulkWrite.filePattern=logs/ignite-bulk-write.log%i
+appender.igBulkWrite.policies.type=SizeBasedTriggeringPolicy
+appender.igBulkWrite.policies.size=10MB
+appender.igBulkWrite.strategy.type=DefaultRolloverStrategy
+appender.igBulkWrite.strategy.max=10
+appender.igBulkWrite.append=true
+appender.igBulkWrite.layout.type=PatternLayout
+appender.igBulkWrite.layout.pattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
+
+appender.igRead.type=RollingFile
+appender.igRead.name=igRead
+appender.igRead.fileName=logs/ignite-read.log
+appender.igRead.filePattern=logs/ignite-read.log%i
+appender.igRead.policies.type=SizeBasedTriggeringPolicy
+appender.igRead.policies.size=10MB
+appender.igRead.strategy.type=DefaultRolloverStrategy
+appender.igRead.strategy.max=10
+appender.igRead.append=true
+appender.igRead.layout.type=PatternLayout
+appender.igRead.layout.pattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
+
+appender.igBulkRead.type=RollingFile
+appender.igBulkRead.name=igBulkRead
+appender.igBulkRead.fileName=logs/ignite-bulk-read.log
+appender.igBulkRead.filePattern=logs/ignite-bulk-read.log%i
+appender.igBulkRead.policies.type=SizeBasedTriggeringPolicy
+appender.igBulkRead.policies.size=10MB
+appender.igBulkRead.strategy.type=DefaultRolloverStrategy
+appender.igBulkRead.strategy.max=10
+appender.igBulkRead.append=true
+appender.igBulkRead.layout.type=PatternLayout
+appender.igBulkRead.layout.pattern=%d{HH:mm:ss,SSS} %5p [%t] - %m%n
diff --git a/modules/clients/pom.xml b/modules/clients/pom.xml
index 6afa2ab..e3bcd85 100644
--- a/modules/clients/pom.xml
+++ b/modules/clients/pom.xml
@@ -75,7 +75,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java
index 789119c..1992643 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/integration/ClientAbstractSelfTest.java
@@ -104,7 +104,7 @@
     private static final Map<String, HashMapStore> cacheStores = new HashMap<>();
 
     /** */
-    public static final String ROUTER_LOG_CFG = "modules/core/src/test/config/log4j-test.xml";
+    public static final String ROUTER_LOG_CFG = "modules/core/src/test/config/log4j2-test.xml";
 
     /** */
     private static final String INTERCEPTED_SUF = "intercepted";
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java
index e870129..3e6de6d 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterAbstractSelfTest.java
@@ -28,7 +28,7 @@
 import org.apache.ignite.internal.client.integration.ClientAbstractSelfTest;
 import org.apache.ignite.internal.client.router.impl.GridTcpRouterImpl;
 import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.logger.log4j.Log4JLogger;
+import org.apache.ignite.logger.log4j2.Log4J2Logger;
 import org.junit.Test;
 
 /**
@@ -110,7 +110,7 @@
         cfg.setPort(ROUTER_PORT);
         cfg.setPortRange(0);
         cfg.setServers(Collections.singleton(HOST + ":" + BINARY_PORT));
-        cfg.setLogger(new Log4JLogger(ROUTER_LOG_CFG));
+        cfg.setLogger(new Log4J2Logger(ROUTER_LOG_CFG));
 
         return cfg;
     }
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterMultiNodeSelfTest.java
index 992d628..909e264 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterMultiNodeSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/router/TcpRouterMultiNodeSelfTest.java
@@ -26,7 +26,7 @@
 import org.apache.ignite.internal.client.GridClientProtocol;
 import org.apache.ignite.internal.client.integration.ClientAbstractMultiNodeSelfTest;
 import org.apache.ignite.internal.client.router.impl.GridTcpRouterImpl;
-import org.apache.ignite.logger.log4j.Log4JLogger;
+import org.apache.ignite.logger.log4j2.Log4J2Logger;
 
 import static org.apache.ignite.internal.client.integration.ClientAbstractSelfTest.ROUTER_LOG_CFG;
 
@@ -88,7 +88,7 @@
         cfg.setPort(ROUTER_TCP_PORT_BASE + i);
         cfg.setPortRange(0);
         cfg.setServers(Collections.singleton(HOST + ":" + REST_TCP_PORT_BASE));
-        cfg.setLogger(new Log4JLogger(ROUTER_LOG_CFG));
+        cfg.setLogger(new Log4J2Logger(ROUTER_LOG_CFG));
 
         return cfg;
     }
diff --git a/modules/clients/src/test/resources/log4j.xml b/modules/clients/src/test/resources/log4j.xml
deleted file mode 100644
index 5c19f0f..0000000
--- a/modules/clients/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN"
-    "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
-<!--
-    Default log4j configuration for Ignite.
--->
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-    <!--
-        Logs System.out messages to console.
-    -->
-    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-        <!-- Log to STDOUT. -->
-        <param name="Target" value="System.out"/>
-
-        <!-- Log from DEBUG and higher. -->
-        <param name="Threshold" value="DEBUG"/>
-
-        <!-- The default pattern: Date Priority [Category] Message\n -->
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{dd-MM-yyyy HH:mm:ss}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-
-        <!-- Do not log beyond INFO level. -->
-        <filter class="org.apache.log4j.varia.LevelRangeFilter">
-            <param name="levelMin" value="DEBUG"/>
-            <param name="levelMax" value="INFO"/>
-        </filter>
-    </appender>
-
-    <!--
-        Logs all System.err messages to console.
-    -->
-    <appender name="CONSOLE_ERR" class="org.apache.log4j.ConsoleAppender">
-        <!-- Log to STDERR. -->
-        <param name="Target" value="System.err"/>
-
-        <!-- Log from WARN and higher. -->
-        <param name="Threshold" value="WARN"/>
-
-        <!-- The default pattern: Date Priority [Category] Message\n -->
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{dd-MMM-yyyy HH:mm:ss}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
-
-    <!--
-        Logs all output to specified file.
-        By default, the logging goes to IGNITE_HOME/work/log folder
-
-        Note, this appender is disabled by default.
-        To enable, uncomment the section below and also FILE appender in the <root> element.
-    -->
-    <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
-        <param name="Threshold" value="DEBUG"/>
-        <param name="File" value="${IGNITE_HOME}/work/log/ignite.log"/>
-        <param name="Append" value="true"/>
-        <param name="MaxFileSize" value="10MB"/>
-        <param name="MaxBackupIndex" value="10"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
-
-    <!--
-        Uncomment to enable Ignite debugging.
-    -->
-    <!--
-    <category name="org.apache.ignite">
-        <level value="DEBUG"/>
-    </category>
-    -->
-
-    <!--
-        Uncomment this category to enable cache
-        query execution tracing.
-    -->
-    <!--
-    <category name="org.apache.ignite.cache.queries">
-        <level value="DEBUG"/>
-    </category>
-    -->
-
-    <!--
-        Uncomment to enable DGC tracing.
-    -->
-    <!--
-    <category name="org.apache.ignite.grid.kernal.processors.cache.GridCacheDgcManager.trace">
-        <level value="DEBUG"/>
-    </category>
-    -->
-
-    <!--
-        Uncomment to disable courtesy notice.
-    -->
-    <!--
-    <category name="org.apache.ignite.CourtesyConfigNotice">
-        <level value="OFF"/>
-    </category>
-    -->
-
-    <category name="org.springframework">
-        <level value="WARN"/>
-    </category>
-
-    <category name="org.eclipse.jetty">
-        <level value="FATAL"/>
-    </category>
-
-    <category name="com.amazonaws">
-        <level value="WARN"/>
-    </category>
-
-    <!-- Default settings. -->
-    <root>
-        <!-- Print out all info by default. -->
-        <level value="INFO"/>
-
-        <!-- Append to console. -->
-        <appender-ref ref="CONSOLE"/>
-        <appender-ref ref="CONSOLE_ERR"/>
-
-        <!-- Uncomment to enable logging to a file. -->
-        <appender-ref ref="FILE"/>
-    </root>
-</log4j:configuration>
diff --git a/modules/clients/src/test/resources/log4j2.xml b/modules/clients/src/test/resources/log4j2.xml
new file mode 100644
index 0000000..6039072
--- /dev/null
+++ b/modules/clients/src/test/resources/log4j2.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<Configuration>
+    <Appenders>
+        <Console name="CONSOLE" target="SYSTEM_OUT">
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
+            <LevelRangeFilter minLevel="INFO" maxLevel="DEBUG"/>
+        </Console>
+
+        <Console name="CONSOLE_ERR" target="SYSTEM_ERR">
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
+        </Console>
+
+        <RollingFile name="FILE"
+                     append="true"
+                     fileName="${sys:IGNITE_HOME}/work/log/ignite.log"
+                     filePattern="${sys:IGNITE_HOME}/work/log/ignite.log.%i">
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
+            <Policies>
+                <SizeBasedTriggeringPolicy size="10 MB"/>
+            </Policies>
+            <DefaultRolloverStrategy max="10"/>
+        </RollingFile>
+    </Appenders>
+
+    <Loggers>
+        <Logger name="org.springframework" level="WARN"/>
+        <Logger name="org.eclipse.jetty" level="FATAL"/>
+        <Logger name="com.amazonaws" level="WARN"/>
+
+        <Root level="INFO">
+            <AppenderRef ref="CONSOLE" level="DEBUG"/>
+            <AppenderRef ref="CONSOLE_ERR" level="WARN"/>
+            <AppenderRef ref="FILE" level="DEBUG"/>
+        </Root>
+    </Loggers>
+</Configuration>
diff --git a/modules/clients/src/test/resources/spring-router-ssl.xml b/modules/clients/src/test/resources/spring-router-ssl.xml
index 6f092f6..e145cce 100644
--- a/modules/clients/src/test/resources/spring-router-ssl.xml
+++ b/modules/clients/src/test/resources/spring-router-ssl.xml
@@ -98,7 +98,7 @@
     <!--
         Logger with the same configuration as in default grid instances.
     -->
-    <bean id="router.log" class="org.apache.ignite.logger.log4j.Log4JLogger">
-        <constructor-arg type="java.lang.String" value="modules/clients/src/test/resources/log4j.xml"/>
+    <bean id="router.log" class="org.apache.ignite.logger.log4j2.Log4J2Logger">
+        <constructor-arg type="java.lang.String" value="modules/clients/src/test/resources/log4j2.xml"/>
     </bean>
 </beans>
diff --git a/modules/clients/src/test/resources/spring-router.xml b/modules/clients/src/test/resources/spring-router.xml
index 8e40db9..dcc5a16 100644
--- a/modules/clients/src/test/resources/spring-router.xml
+++ b/modules/clients/src/test/resources/spring-router.xml
@@ -87,7 +87,7 @@
     <!--
         Logger with the same configuration as in default grid instances.
     -->
-    <bean id="router.log" class="org.apache.ignite.logger.log4j.Log4JLogger">
-        <constructor-arg type="java.lang.String" value="modules/clients/src/test/resources/log4j.xml"/>
+    <bean id="router.log" class="org.apache.ignite.logger.log4j2.Log4J2Logger">
+        <constructor-arg type="java.lang.String" value="modules/clients/src/test/resources/log4j2.xml"/>
     </bean>
 </beans>
diff --git a/modules/clients/src/test/resources/spring-server-node.xml b/modules/clients/src/test/resources/spring-server-node.xml
index 3211b80..2c27b2f 100644
--- a/modules/clients/src/test/resources/spring-server-node.xml
+++ b/modules/clients/src/test/resources/spring-server-node.xml
@@ -284,8 +284,8 @@
             Logger to use.
         -->
         <property name="gridLogger">
-            <bean class="org.apache.ignite.logger.log4j.Log4JLogger">
-                <constructor-arg type="java.lang.String" value="modules/clients/src/test/resources/log4j.xml"/>
+            <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
+                <constructor-arg type="java.lang.String" value="modules/clients/src/test/resources/log4j2.xml"/>
             </bean>
         </property>
 
diff --git a/modules/clients/src/test/resources/spring-server-ssl-node.xml b/modules/clients/src/test/resources/spring-server-ssl-node.xml
index d71540d..d8e16ff 100644
--- a/modules/clients/src/test/resources/spring-server-ssl-node.xml
+++ b/modules/clients/src/test/resources/spring-server-ssl-node.xml
@@ -270,8 +270,8 @@
             Logger to use.
         -->
         <property name="gridLogger">
-            <bean class="org.apache.ignite.logger.log4j.Log4JLogger">
-                <constructor-arg type="java.lang.String" value="modules/clients/src/test/resources/log4j.xml"/>
+            <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
+                <constructor-arg type="java.lang.String" value="modules/clients/src/test/resources/log4j2.xml"/>
             </bean>
         </property>
 
diff --git a/modules/compatibility/pom.xml b/modules/compatibility/pom.xml
index 3be245a..874bd31 100644
--- a/modules/compatibility/pom.xml
+++ b/modules/compatibility/pom.xml
@@ -92,8 +92,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testframework/junits/IgniteCompatibilityAbstractTest.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testframework/junits/IgniteCompatibilityAbstractTest.java
index 0c60bd3..46e94db 100644
--- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testframework/junits/IgniteCompatibilityAbstractTest.java
+++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/testframework/junits/IgniteCompatibilityAbstractTest.java
@@ -33,12 +33,14 @@
 import org.apache.ignite.internal.processors.resource.GridSpringResourceContext;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteInClosure;
+import org.apache.ignite.lang.IgniteProductVersion;
 import org.apache.ignite.testframework.ListeningTestLogger;
 import org.apache.ignite.testframework.LogListener;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.testframework.junits.multijvm.IgniteProcessProxy;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
+
 import static org.apache.ignite.compatibility.testframework.junits.Dependency.APACHE_IGNITE_GROUP_ID;
 
 /**
@@ -252,6 +254,9 @@
         dependencies.add(new Dependency("core", "ignite-core", false));
         dependencies.add(new Dependency("core", "ignite-core", true));
 
+        if (IgniteProductVersion.fromString("2.14.0").compareTo(IgniteProductVersion.fromString(igniteVer)) > 0)
+            dependencies.add(new Dependency("log4j", "log4j", "log4j", "1.2.17", false));
+
         return dependencies;
     }
 
diff --git a/modules/compress/pom.xml b/modules/compress/pom.xml
index 17d1752..67ac1da 100644
--- a/modules/compress/pom.xml
+++ b/modules/compress/pom.xml
@@ -92,8 +92,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/control-utility/pom.xml b/modules/control-utility/pom.xml
index 033e2e7..42a5050 100644
--- a/modules/control-utility/pom.xml
+++ b/modules/control-utility/pom.xml
@@ -95,15 +95,8 @@
         </dependency>
 
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>${slf4j.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/core/pom.xml b/modules/core/pom.xml
index 4d4f28f..455a01d 100644
--- a/modules/core/pom.xml
+++ b/modules/core/pom.xml
@@ -140,8 +140,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java b/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
index 583e848..c0c0b48 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
@@ -23,17 +23,17 @@
 /**
  * This interface defines basic logging functionality used throughout the system. We had to
  * abstract it out so that we can use whatever logging is used by the hosting environment.
- * Currently, <a target=_new href="http://logging.apache.org/log4j/1.2/">log4j</a>,
+ * Currently, <a target=_new href="http://https://logging.apache.org/log4j/2.x/">log4j2</a>,
  * <a target=_new href="https://docs.jboss.org/hibernate/orm/5.4/topical/html_single/logging/Logging.html">JBoss</a>,
  * <a target=_new href="http://jakarta.apache.org/commons/logging/">JCL</a> and
  * console logging are provided as supported implementations.
  * <p>
- * Ignite logger could be configured either from code (for example log4j logger):
+ * Ignite logger could be configured either from code (for example log4j2 logger):
  * <pre name="code" class="java">
  *      IgniteConfiguration cfg = new IgniteConfiguration();
  *      ...
  *      URL xml = U.resolveIgniteUrl("config/custom-log4j.xml");
- *      IgniteLogger log = new Log4JLogger(xml);
+ *      IgniteLogger log = new Log4J2Logger(xml);
  *      ...
  *      cfg.setGridLogger(log);
  * </pre>
@@ -43,7 +43,7 @@
  *      &lt;property name="gridLogger"&gt;
  *          &lt;bean class="org.apache.ignite.logger.jcl.JclLogger"&gt;
  *              &lt;constructor-arg type="org.apache.commons.logging.Log"&gt;
- *                  &lt;bean class="org.apache.commons.logging.impl.Log4JLogger"&gt;
+ *                  &lt;bean class="org.apache.commons.logging.impl.Log4J2Logger"&gt;
  *                      &lt;constructor-arg type="java.lang.String" value="config/ignite-log4j.xml"/&gt;
  *                  &lt;/bean&gt;
  *              &lt;/constructor-arg&gt;
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
index bef7031..07b3c00 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
@@ -922,7 +922,7 @@
 
     /**
      * Should return an instance of logger to use in grid. If not provided,
-     * {@ignitelink org.apache.ignite.logger.log4j.Log4JLogger}
+     * {@ignitelink org.apache.ignite.logger.log4j2.Log4J2Logger}
      * will be used.
      *
      * @return Logger to use in grid.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
index 3863671..6a67355 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
@@ -907,23 +907,7 @@
         @Nullable GridSpringResourceContext springCtx, @Nullable ClassLoader ldr) throws IgniteCheckedException {
         A.notNull(springCfgUrl, "springCfgUrl");
 
-        boolean isLog4jUsed = U.gridClassLoader().getResource("org/apache/log4j/Appender.class") != null;
-
-        IgniteBiTuple<Object, Object> t = null;
-
-        if (isLog4jUsed) {
-            try {
-                t = U.addLog4jNoOpLogger();
-            }
-            catch (IgniteCheckedException ignore) {
-                isLog4jUsed = false;
-            }
-        }
-
-        Collection<Handler> savedHnds = null;
-
-        if (!isLog4jUsed)
-            savedHnds = U.addJavaNoOpLogger();
+        Collection<Handler> savedHnds = U.addJavaNoOpLogger();
 
         IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext> cfgMap;
 
@@ -931,11 +915,7 @@
             cfgMap = loadConfigurations(springCfgUrl);
         }
         finally {
-            if (isLog4jUsed && t != null)
-                U.removeLog4jNoOpLogger(t);
-
-            if (!isLog4jUsed)
-                U.removeJavaNoOpLogger(savedHnds);
+            U.removeJavaNoOpLogger(savedHnds);
         }
 
         return startConfigurations(cfgMap, springCfgUrl, igniteInstanceName, springCtx, ldr);
@@ -987,23 +967,7 @@
         @Nullable GridSpringResourceContext springCtx, @Nullable ClassLoader ldr) throws IgniteCheckedException {
         A.notNull(springCfgStream, "springCfgUrl");
 
-        boolean isLog4jUsed = U.gridClassLoader().getResource("org/apache/log4j/Appender.class") != null;
-
-        IgniteBiTuple<Object, Object> t = null;
-
-        if (isLog4jUsed) {
-            try {
-                t = U.addLog4jNoOpLogger();
-            }
-            catch (IgniteCheckedException ignore) {
-                isLog4jUsed = false;
-            }
-        }
-
-        Collection<Handler> savedHnds = null;
-
-        if (!isLog4jUsed)
-            savedHnds = U.addJavaNoOpLogger();
+        Collection<Handler> savedHnds = U.addJavaNoOpLogger();
 
         IgniteBiTuple<Collection<IgniteConfiguration>, ? extends GridSpringResourceContext> cfgMap;
 
@@ -1011,11 +975,7 @@
             cfgMap = loadConfigurations(springCfgStream);
         }
         finally {
-            if (isLog4jUsed && t != null)
-                U.removeLog4jNoOpLogger(t);
-
-            if (!isLog4jUsed)
-                U.removeJavaNoOpLogger(savedHnds);
+            U.removeJavaNoOpLogger(savedHnds);
         }
 
         return startConfigurations(cfgMap, null, igniteInstanceName, springCtx, ldr);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/GridClientImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/GridClientImpl.java
index c52241c..b41b531 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/GridClientImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/GridClientImpl.java
@@ -33,7 +33,6 @@
 import java.util.logging.Logger;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLException;
-import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.internal.client.GridClient;
@@ -81,19 +80,8 @@
 
     /* Suppression logging if needed. */
     static {
-        if (!IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_GRID_CLIENT_LOG_ENABLED, false)) {
-            boolean isLog4jUsed = U.gridClassLoader().getResource("org/apache/log4j/Appender.class") != null;
-
-            try {
-                if (isLog4jUsed)
-                    U.addLog4jNoOpLogger();
-
-                U.addJavaNoOpLogger();
-            }
-            catch (IgniteCheckedException ignored) {
-                // If log warning suppression failed, leave it as is.
-            }
-        }
+        if (!IgniteSystemProperties.getBoolean(IgniteSystemProperties.IGNITE_GRID_CLIENT_LOG_ENABLED, false))
+            log.setLevel(Level.OFF);
     }
 
     /** Client ID. */
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java b/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
index 52a5279..44c46d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
@@ -28,7 +28,6 @@
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lifecycle.LifecycleAware;
 
 import static org.apache.ignite.internal.IgniteComponentType.SPRING;
@@ -129,22 +128,7 @@
             System.exit(1);
         }
 
-        boolean isLog4jUsed = U.gridClassLoader().getResource("org/apache/log4j/Appender.class") != null;
-
-        IgniteBiTuple<Object, Object> t = null;
-        Collection<Handler> savedHnds = null;
-
-        if (isLog4jUsed) {
-            try {
-                t = U.addLog4jNoOpLogger();
-            }
-            catch (Exception ignored) {
-                isLog4jUsed = false;
-            }
-        }
-
-        if (!isLog4jUsed)
-            savedHnds = U.addJavaNoOpLogger();
+        Collection<Handler> savedHnds = U.addJavaNoOpLogger();
 
         Map<Class<?>, Collection> beans;
 
@@ -152,11 +136,7 @@
             beans = spring.loadBeans(cfgUrl, IgniteLogger.class, GridTcpRouterConfiguration.class).get1();
         }
         finally {
-            if (isLog4jUsed && t != null)
-                U.removeLog4jNoOpLogger(t);
-
-            if (!isLog4jUsed)
-                U.removeJavaNoOpLogger(savedHnds);
+            U.removeJavaNoOpLogger(savedHnds);
         }
 
         final GridRouterCommandLineStartup routerStartup = new GridRouterCommandLineStartup();
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 1ff6f1d..a29516d 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -4752,7 +4752,7 @@
                 Class<?> log4jCls;
 
                 try {
-                    log4jCls = Class.forName("org.apache.ignite.logger.log4j.Log4JLogger");
+                    log4jCls = Class.forName("org.apache.ignite.logger.log4j2.Log4J2Logger");
                 }
                 catch (ClassNotFoundException | NoClassDefFoundError ignored) {
                     log4jCls = null;
@@ -4813,7 +4813,7 @@
                 ((LoggerNodeIdAware)cfgLog).setNodeId(nodeId);
 
             if (log4jInitErr != null)
-                U.warn(cfgLog, "Failed to initialize Log4JLogger (falling back to standard java logging): "
+                U.warn(cfgLog, "Failed to initialize Log4J2Logger (falling back to standard java logging): "
                     + log4jInitErr.getCause());
 
             return cfgLog;
@@ -8969,66 +8969,6 @@
     }
 
     /**
-     * Adds no-op logger to remove no-appender warning.
-     *
-     * @return Tuple with root log and no-op appender instances. No-op appender can be {@code null}
-     *      if it did not found in classpath. Notice that in this case logging is not suppressed.
-     * @throws IgniteCheckedException In case of failure to add no-op logger for Log4j.
-     */
-    public static IgniteBiTuple<Object, Object> addLog4jNoOpLogger() throws IgniteCheckedException {
-        Object rootLog;
-        Object nullApp;
-
-        try {
-            // Add no-op logger to remove no-appender warning.
-            Class<?> logCls = Class.forName("org.apache.log4j.Logger");
-
-            rootLog = logCls.getMethod("getRootLogger").invoke(logCls);
-
-            try {
-                nullApp = Class.forName("org.apache.log4j.varia.NullAppender").newInstance();
-            }
-            catch (ClassNotFoundException ignore) {
-                // Can't found log4j no-op appender in classpath (for example, log4j was added through
-                // log4j-over-slf4j library. No-appender warning will not be suppressed.
-                return new IgniteBiTuple<>(rootLog, null);
-            }
-
-            Class appCls = Class.forName("org.apache.log4j.Appender");
-
-            rootLog.getClass().getMethod("addAppender", appCls).invoke(rootLog, nullApp);
-        }
-        catch (Exception e) {
-            throw new IgniteCheckedException("Failed to add no-op logger for Log4j.", e);
-        }
-
-        return new IgniteBiTuple<>(rootLog, nullApp);
-    }
-
-    /**
-     * Removes previously added no-op logger via method {@link #addLog4jNoOpLogger}.
-     *
-     * @param t Tuple with root log and null appender instances.
-     * @throws IgniteCheckedException In case of failure to remove previously added no-op logger for Log4j.
-     */
-    public static void removeLog4jNoOpLogger(IgniteBiTuple<Object, Object> t) throws IgniteCheckedException {
-        Object rootLog = t.get1();
-        Object nullApp = t.get2();
-
-        if (nullApp == null)
-            return;
-
-        try {
-            Class appenderCls = Class.forName("org.apache.log4j.Appender");
-
-            rootLog.getClass().getMethod("removeAppender", appenderCls).invoke(rootLog, nullApp);
-        }
-        catch (Exception e) {
-            throw new IgniteCheckedException("Failed to remove previously added no-op logger for Log4j.", e);
-        }
-    }
-
-    /**
      * Adds no-op console handler for root java logger.
      *
      * @return Removed handlers.
diff --git a/modules/core/src/test/config/log4j-tc-test.xml b/modules/core/src/test/config/log4j-tc-test.xml
index 302913e..ba1d36a 100755
--- a/modules/core/src/test/config/log4j-tc-test.xml
+++ b/modules/core/src/test/config/log4j-tc-test.xml
@@ -17,105 +17,59 @@
   ~ limitations under the License.
   -->
 
-<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN"
-    "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
+
 <!--
-    Log4j configuration.
+    Log4j2 configuration.
 -->
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-    <!--
-        Logs System.out messages to console.
-    -->
-    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-        <!-- Log to STDOUT. -->
-        <param name="Target" value="System.out"/>
+<Configuration>
+    <Appenders>
+        <Console name="CONSOLE" target="SYSTEM_OUT">
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
+            <LevelRangeFilter minLevel="INFO" maxLevel="DEBUG"/>
+        </Console>
 
-        <!-- Log from DEBUG and higher. -->
-        <param name="Threshold" value="DEBUG"/>
+        <Console name="CONSOLE_ERR" target="SYSTEM_ERR">
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
+        </Console>
 
-        <!-- The default pattern: Date Priority [Category] Message\n -->
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
+        <RollingFile name="FILE"
+                     fileName="${sys:IGNITE_HOME}/work/log/ignite.log"
+                     filePattern="${sys:IGNITE_HOME}/work/log/ignite.log.%i"
+                     append="true">
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
+            <Policies>
+                <SizeBasedTriggeringPolicy size="10 MB"/>
+            </Policies>
+            <DefaultRolloverStrategy max="10"/>
+        </RollingFile>
+    </Appenders>
 
-        <!-- Do not log beyond INFO level. -->
-        <filter class="org.apache.log4j.varia.LevelRangeFilter">
-            <param name="levelMin" value="DEBUG"/>
-            <param name="levelMax" value="INFO"/>
-        </filter>
-    </appender>
+    <Loggers>
+        <Logger name="org.apache.ignite.internal.diagnostic" level="INFO">
+            <AppenderRef ref="CONSOLE" level="INFO"/>
+        </Logger>
 
-    <!--
-        Logs all System.err messages to console.
-    -->
-    <appender name="CONSOLE_ERR" class="org.apache.log4j.ConsoleAppender">
-        <!-- Log to STDERR. -->
-        <param name="Target" value="System.err"/>
+        <!--
+            Uncomment to enable Ignite query execution debugging.
+        -->
+        <!--
+            <Logger name="org.apache.ignite.internal.processors.query" level="DEBUG"/>
+        -->
 
-        <!-- Log from WARN and higher. -->
-        <param name="Threshold" value="WARN"/>
+        <!--
+            Uncomment to enable Exchange, Rebalance and Partitions workflow debugging.
+        -->
+        <!--
+            <Logger name="org.apache.ignite.internal.processors.cache.distributed.dht.preloader" level="DEBUG"/>
+            <Logger name="org.apache.ignite.internal.processors.cache.distributed.dht.topology" level="DEBUG"/>
+        -->
 
-        <!-- The default pattern: Date Priority [Category] Message\n -->
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
+        <Logger name="org" level="INFO"/>
+        <Logger name="org.eclipse.jetty" level="INFO"/>
 
-    <!--
-        Logs all output to specified file.
-    -->
-    <appender name="FILE" class="org.apache.log4j.FileAppender">
-        <param name="Threshold" value="DEBUG"/>
-        <param name="File" value="${IGNITE_HOME}/work/log/ignite.log"/>
-        <param name="Append" value="true"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
-
-    <logger name="org.apache.ignite.internal.diagnostic">
-        <level value="INFO"/>
-        <appender-ref ref="CONSOLE"/>
-    </logger>
-
-    <!--
-        Uncomment to enable Ignite query execution debugging.
-    -->
-    <!--
-    <category name="org.apache.ignite.internal.processors.query">
-        <level value="DEBUG"/>
-    </category>
-    -->
-
-    <!--
-        Uncomment to enable Exchange, Rebalance and Partitions workflow debugging.
-    -->
-    <!--
-         <category name="org.apache.ignite.internal.processors.cache.distributed.dht.preloader">
-             <level value="DEBUG"/>
-         </category>
-
-        <category name="org.apache.ignite.internal.processors.cache.distributed.dht.topology">
-            <level value="DEBUG"/>
-        </category>
-    -->
-
-    <!-- Disable all open source debugging. -->
-    <category name="org">
-        <level value="INFO"/>
-    </category>
-
-    <category name="org.eclipse.jetty">
-        <level value="INFO"/>
-    </category>
-
-    <!-- Default settings. -->
-    <root>
-        <!-- Print at info by default. -->
-        <level value="INFO"/>
-
-        <!-- Append to file and console. -->
-        <appender-ref ref="FILE"/>
-        <appender-ref ref="CONSOLE_ERR"/>
-    </root>
-</log4j:configuration>
+        <Root level="INFO">
+            <AppenderRef ref="FILE" level="DEBUG"/>
+            <AppenderRef ref="CONSOLE_ERR" level="WARN"/>
+        </Root>
+    </Loggers>
+</Configuration>
diff --git a/modules/core/src/test/config/log4j2-test.xml b/modules/core/src/test/config/log4j2-test.xml
index 9740c2c..e1056be 100644
--- a/modules/core/src/test/config/log4j2-test.xml
+++ b/modules/core/src/test/config/log4j2-test.xml
@@ -21,37 +21,70 @@
     <Appenders>
         <Console name="CONSOLE" target="SYSTEM_OUT">
             <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}]%notEmpty{[%markerSimpleName]} %m%n"/>
-            <ThresholdFilter level="ERROR" onMatch="DENY" onMismatch="ACCEPT"/>
+            <LevelRangeFilter minLevel="INFO" maxLevel="DEBUG"/>
         </Console>
 
         <Console name="CONSOLE_ERR" target="SYSTEM_ERR">
-            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}]%notEmpty{[%markerSimpleName]} %m%n"/>
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
         </Console>
 
-        <Routing name="FILE">
-            <Routes pattern="$${sys:nodeId}">
-                <Route>
-                    <RollingFile name="Rolling-${sys:nodeId}" fileName="${sys:IGNITE_HOME}/work/log/${sys:appId}-${sys:nodeId}.log"
-                                 filePattern="${sys:IGNITE_HOME}/work/log/${sys:appId}-${sys:nodeId}-%i-%d{yyyy-MM-dd}.log.gz">
-                        <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}]%notEmpty{[%markerSimpleName]} %m%n"/>
-                        <Policies>
-                            <TimeBasedTriggeringPolicy interval="6" modulate="true" />
-                            <SizeBasedTriggeringPolicy size="10 MB" />
-                        </Policies>
-                    </RollingFile>
-                </Route>
-            </Routes>
-        </Routing>
+        <RollingFile name="FILE"
+                     append="true"
+                     fileName="${sys:IGNITE_HOME}/work/log/ignite.log"
+                     filePattern="${sys:IGNITE_HOME}/work/log/ignite.log.%i">
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}]%notEmpty{[%markerSimpleName]} %m%n"/>
+            <Policies>
+                <SizeBasedTriggeringPolicy size="10 MB"/>
+            </Policies>
+            <DefaultRolloverStrategy max="10"/>
+        </RollingFile>
     </Appenders>
 
     <Loggers>
+        <!--
+            Uncomment to enable Ignite query execution debugging.
+        -->
+        <!--
+            <Logger name="org.apache.ignite.internal.processors.query" level="DEBUG"/>
+        -->
+
+        <!--
+            Uncomment to enable Exchange, Rebalance and Partitions workflow debugging.
+        -->
+        <!--
+            <Logger name="org.apache.ignite.internal.processors.cache.distributed.dht.preloader" level="DEBUG"/>
+            <Logger name="org.apache.ignite.internal.processors.cache.distributed.dht.topology" level="DEBUG"/>
+        -->
+
+        <!--
+            Uncomment to enable debugging of partition counters.
+        -->
+        <!--
+            <Logger name="org.apache.ignite.internal.processors.cache.PartitionUpdateCounterDebugWrapper" level="DEBUG"/>
+        -->
+
+        <!--
+            Uncomment to enable transactions debugging.
+        -->
+        <!--
+            <Logger name="org.apache.ignite.cache.msg.tx.prepare" level="DEBUG"/>
+            <Logger name="org.apache.ignite.cache.msg.tx.finish" level="DEBUG"/>
+            <Logger name="org.apache.ignite.cache.msg.tx.recovery" level="DEBUG"/>
+        -->
+
+        <!--
+            Uncomment to enable debugging of partition eviction.
+        -->
+        <!--
+            <Logger name="org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionsEvictManager" level="DEBUG"/>
+        -->
         <Logger name="org" level="INFO"/>
         <Logger name="org.eclipse.jetty" level="INFO"/>
 
         <Root level="INFO">
+            <AppenderRef ref="FILE" level="DEBUG"/>
             <AppenderRef ref="CONSOLE" level="DEBUG"/>
             <AppenderRef ref="CONSOLE_ERR" level="WARN"/>
-            <AppenderRef ref="FILE" level="DEBUG"/>
         </Root>
     </Loggers>
 </Configuration>
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
index c131b46..a0987d4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/IgniteTopologyPrintFormatSelfTest.java
@@ -31,7 +31,7 @@
 import org.apache.ignite.testframework.LogListener;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger;
-import org.apache.log4j.Level;
+import org.apache.logging.log4j.Level;
 import org.junit.Test;
 
 /**
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedTxSingleThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedTxSingleThreadedSelfTest.java
index afb85db..0d7fa1c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedTxSingleThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedTxSingleThreadedSelfTest.java
@@ -22,7 +22,7 @@
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
 import org.apache.ignite.internal.processors.cache.IgniteTxSingleThreadedAbstractTest;
-import org.apache.log4j.Level;
+import org.apache.logging.log4j.Level;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
index d5f7d92..be25f5c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLockSelfTest.java
@@ -21,7 +21,7 @@
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
 import org.apache.ignite.internal.processors.cache.distributed.GridCacheLockAbstractTest;
-import org.apache.log4j.Level;
+import org.apache.logging.log4j.Level;
 
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
index d38a1f6..a3b5148 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxMultiThreadedSelfTest.java
@@ -22,7 +22,7 @@
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
 import org.apache.ignite.internal.processors.cache.IgniteTxMultiThreadedAbstractTest;
-import org.apache.log4j.Level;
+import org.apache.logging.log4j.Level;
 
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSingleThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSingleThreadedSelfTest.java
index f8fe927..570e234 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSingleThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedTxSingleThreadedSelfTest.java
@@ -22,7 +22,7 @@
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
 import org.apache.ignite.internal.processors.cache.IgniteTxSingleThreadedAbstractTest;
-import org.apache.log4j.Level;
+import org.apache.logging.log4j.Level;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java
index e44d92f..00b2f7e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxMultiThreadedSelfTest.java
@@ -22,8 +22,8 @@
 import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
 import org.apache.ignite.internal.processors.cache.IgniteTxMultiThreadedAbstractTest;
 import org.apache.ignite.testframework.MvccFeatureChecker;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.Configurator;
 import org.junit.Before;
 
 import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -58,9 +58,7 @@
         c.setCacheConfiguration(cc);
 
         // Disable log4j debug by default.
-        Logger log4j = Logger.getLogger(GridCacheProcessor.class.getPackage().getName());
-
-        log4j.setLevel(CACHE_DEBUG ? Level.DEBUG : Level.INFO);
+        Configurator.setLevel(GridCacheProcessor.class.getPackage().getName(), CACHE_DEBUG ? Level.DEBUG : Level.INFO);
 
         return c;
     }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java
index 677dd8d..14aeacf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalTxSingleThreadedSelfTest.java
@@ -22,8 +22,8 @@
 import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
 import org.apache.ignite.internal.processors.cache.IgniteTxSingleThreadedAbstractTest;
 import org.apache.ignite.testframework.MvccFeatureChecker;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.Configurator;
 import org.junit.Before;
 
 import static org.apache.ignite.cache.CacheMode.LOCAL;
@@ -58,9 +58,7 @@
         c.setCacheConfiguration(cc);
 
         // Disable log4j debug by default.
-        Logger log4j = Logger.getLogger(GridCacheProcessor.class.getPackage().getName());
-
-        log4j.setLevel(CACHE_DEBUG ? Level.DEBUG : Level.INFO);
+        Configurator.setLevel(GridCacheProcessor.class.getPackage().getName(), CACHE_DEBUG ? Level.DEBUG : Level.INFO);
 
         return c;
     }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotMXBeanTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotMXBeanTest.java
index fd68a57..ef44ce1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotMXBeanTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotMXBeanTest.java
@@ -38,6 +38,7 @@
 import static org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotRestoreProcess.SNAPSHOT_RESTORE_METRICS;
 import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.RESTORE_CACHE_GROUP_SNAPSHOT_PREPARE;
 import static org.apache.ignite.testframework.GridTestUtils.assertThrowsAnyCause;
+import static org.apache.ignite.testframework.GridTestUtils.waitForCondition;
 
 /**
  * Tests {@link SnapshotMXBean}.
@@ -153,9 +154,12 @@
         assertThrowsAnyCause(log, () -> fut.get(TIMEOUT), IgniteCheckedException.class, expErrMsg);
 
         assertTrue((long)getMetric("endTime", mReg0) > 0);
-        assertTrue((long)getMetric("endTime", mReg1) > 0);
         assertTrue(((String)getMetric("error", mReg0)).contains(expErrMsg));
-        assertTrue(((String)getMetric("error", mReg1)).contains(expErrMsg));
+
+        // We use {@code waitForCondition} here and below since {@code fut} completeness guarantees that snapshot
+        // procedure is completed only on the initiator node. Remote nodes can not handle snapshot cancellation event yet.
+        assertTrue(waitForCondition(() -> (long)getMetric("endTime", mReg1) > 0, getTestTimeout()));
+        assertTrue(waitForCondition(() -> ((String)getMetric("error", mReg1)).contains(expErrMsg), getTestTimeout()));
 
         assertNull(ignite.cache(DEFAULT_CACHE_NAME));
     }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java
index 66e27f0..e4d4cf9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java
@@ -52,15 +52,15 @@
 import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.apache.log4j.Appender;
-import org.apache.log4j.Logger;
-import org.apache.log4j.SimpleLayout;
-import org.apache.log4j.WriterAppender;
+import org.apache.logging.log4j.core.appender.WriterAppender;
 import org.junit.Ignore;
 import org.junit.Test;
 
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.addRootLoggerAppender;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.removeRootLoggerAppender;
+import static org.apache.logging.log4j.Level.ALL;
 
 /**
  * Tests for {@code IgniteDataStreamerImpl}.
@@ -437,9 +437,12 @@
         cnt = 0;
 
         StringWriter logWriter = new StringWriter();
-        Appender logAppender = new WriterAppender(new SimpleLayout(), logWriter);
+        String appName = "test-string-writer";
 
-        Logger.getRootLogger().addAppender(logAppender);
+        addRootLoggerAppender(ALL, WriterAppender.newBuilder()
+            .setName(appName)
+            .setTarget(logWriter)
+            .build());
 
         startGrids(MAX_CACHE_COUNT - 1); // cache-enabled nodes
 
@@ -455,9 +458,7 @@
 
             logWriter.flush();
 
-            Logger.getRootLogger().removeAppender(logAppender);
-
-            logAppender.close();
+            removeRootLoggerAppender(appName);
         }
 
         assertFalse(logWriter.toString().contains("DataStreamer will retry data transfer at stable topology"));
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/GridSingleExecutionTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/GridSingleExecutionTest.java
index d2ac5f6..495b367 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/GridSingleExecutionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/GridSingleExecutionTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.loadtests;
 
 import java.io.File;
-import java.io.IOException;
 import java.io.Serializable;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
@@ -45,18 +44,29 @@
 import org.apache.ignite.resources.TaskSessionResource;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger;
-import org.apache.log4j.Appender;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.RollingFileAppender;
-import org.apache.log4j.varia.LevelRangeFilter;
-import org.apache.log4j.varia.NullAppender;
+import org.apache.logging.log4j.core.appender.ConsoleAppender;
+import org.apache.logging.log4j.core.appender.RollingFileAppender;
+import org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.filter.LevelRangeFilter;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.FileSystemXmlApplicationContext;
 
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.CONSOLE;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.CONSOLE_ERROR;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.DEFAULT_PATTERN_LAYOUT;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.FILE;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.addRootLoggerAppender;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.removeAllRootLoggerAppenders;
+import static org.apache.logging.log4j.Level.DEBUG;
+import static org.apache.logging.log4j.Level.INFO;
+import static org.apache.logging.log4j.Level.WARN;
+import static org.apache.logging.log4j.core.Filter.Result.ACCEPT;
+import static org.apache.logging.log4j.core.Filter.Result.DENY;
+import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_ERR;
+import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_OUT;
+
 /**
  * Single execution test.
  */
@@ -130,59 +140,37 @@
      * @throws IgniteCheckedException If file initialization failed.
      */
     private static IgniteLogger initLogger(String log) throws IgniteCheckedException {
-
-        Logger impl = Logger.getRootLogger();
-
-        impl.removeAllAppenders();
+        removeAllRootLoggerAppenders();
 
         String fileName = U.getIgniteHome() + "/work/log/" + log;
 
-        // Configure output that should go to System.out
-        RollingFileAppender fileApp;
-
-        String fmt = "[%d{ISO8601}][%-5p][%t][%c{1}] %m%n";
-
-        try {
-            fileApp = new RollingFileAppender(new PatternLayout(fmt), fileName);
-
-            fileApp.setMaxBackupIndex(0);
-
-            fileApp.rollOver();
-        }
-        catch (IOException e) {
-            throw new IgniteCheckedException("Unable to initialize file appender.", e);
-        }
-
-        LevelRangeFilter lvlFilter = new LevelRangeFilter();
-
-        lvlFilter.setLevelMin(Level.DEBUG);
-
-        fileApp.addFilter(lvlFilter);
-
-        impl.addAppender(fileApp);
+        // Configure output that should go to file
+        addRootLoggerAppender(DEBUG, RollingFileAppender.newBuilder()
+            .setName(FILE)
+            .withFileName(fileName)
+            .withFilePattern(fileName + ".%i")
+            .setLayout(DEFAULT_PATTERN_LAYOUT)
+            .withStrategy(DefaultRolloverStrategy.newBuilder().withMax("0").build())
+            .build());
 
         // Configure output that should go to System.out
-        ConsoleAppender conApp = new ConsoleAppender(new PatternLayout(fmt), ConsoleAppender.SYSTEM_OUT);
-
-        lvlFilter = new LevelRangeFilter();
-
-        lvlFilter.setLevelMin(Level.INFO);
-        lvlFilter.setLevelMax(Level.INFO);
-
-        conApp.addFilter(lvlFilter);
-
-        impl.addAppender(conApp);
+        addRootLoggerAppender(INFO, ConsoleAppender.newBuilder()
+            .setName(CONSOLE)
+            .setTarget(SYSTEM_OUT)
+            .setFilter(LevelRangeFilter.createFilter(INFO, INFO, ACCEPT, DENY))
+            .setLayout(DEFAULT_PATTERN_LAYOUT)
+            .build());
 
         // Configure output that should go to System.err
-        conApp = new ConsoleAppender(new PatternLayout(fmt), ConsoleAppender.SYSTEM_ERR);
+        addRootLoggerAppender(WARN, ConsoleAppender.newBuilder()
+            .setName(CONSOLE_ERROR)
+            .setTarget(SYSTEM_ERR)
+            .setLayout(DEFAULT_PATTERN_LAYOUT)
+            .build());
 
-        conApp.setThreshold(Level.WARN);
+        Configurator.setRootLevel(INFO);
 
-        impl.addAppender(conApp);
-
-        impl.setLevel(Level.INFO);
-
-        Logger.getLogger("org.apache.ignite").setLevel(Level.DEBUG);
+        Configurator.setLevel("org.apache.ignite", DEBUG);
 
         return new GridTestLog4jLogger(false);
     }
@@ -206,11 +194,6 @@
         if (!path.isFile())
             throw new IgniteCheckedException("Provided file path is not a file: " + path);
 
-        // Add no-op logger to remove no-appender warning.
-        Appender app = new NullAppender();
-
-        Logger.getRootLogger().addAppender(app);
-
         ApplicationContext springCtx;
 
         try {
@@ -234,9 +217,6 @@
         if (cfgMap == null)
             throw new IgniteCheckedException("Failed to find a single grid factory configuration in: " + path);
 
-        // Remove previously added no-op logger.
-        Logger.getRootLogger().removeAppender(app);
-
         if (cfgMap.isEmpty())
             throw new IgniteCheckedException("Can't find grid factory configuration in: " + path);
 
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java
index 37c0cf4..2cf3e73 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheAbstractLoadTest.java
@@ -41,19 +41,29 @@
 import org.apache.ignite.transactions.Transaction;
 import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
-import org.apache.log4j.Appender;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.RollingFileAppender;
-import org.apache.log4j.varia.LevelRangeFilter;
-import org.apache.log4j.varia.NullAppender;
+import org.apache.logging.log4j.core.appender.ConsoleAppender;
+import org.apache.logging.log4j.core.appender.RollingFileAppender;
+import org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.filter.LevelRangeFilter;
 import org.jetbrains.annotations.Nullable;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.FileSystemXmlApplicationContext;
 
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.CONSOLE;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.CONSOLE_ERROR;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.DEFAULT_PATTERN_LAYOUT;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.FILE;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.addRootLoggerAppender;
+import static org.apache.logging.log4j.Level.DEBUG;
+import static org.apache.logging.log4j.Level.INFO;
+import static org.apache.logging.log4j.Level.WARN;
+import static org.apache.logging.log4j.core.Filter.Result.ACCEPT;
+import static org.apache.logging.log4j.core.Filter.Result.DENY;
+import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_ERR;
+import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_OUT;
+
 /**
  * Common stuff for cache load tests.
  */
@@ -261,66 +271,39 @@
      * @throws IgniteCheckedException If file initialization failed.
      */
     protected IgniteLogger initLogger(String log) throws IgniteCheckedException {
-        Logger impl = Logger.getRootLogger();
-
-        impl.removeAllAppenders();
+        GridTestLog4jLogger.removeAllRootLoggerAppenders();
 
         String fileName = U.getIgniteHome() + "/work/log/" + log;
 
-        // Configure output that should go to System.out
-        RollingFileAppender fileApp;
-
-        String fmt = "[%d{ISO8601}][%-5p][%t][%c{1}] %m%n";
-
-        try {
-            fileApp = new RollingFileAppender(new PatternLayout(fmt), fileName);
-
-            fileApp.setMaxBackupIndex(0);
-            fileApp.setAppend(false);
-
-            // fileApp.rollOver();
-
-            fileApp.activateOptions();
-        }
-        catch (IOException e) {
-            throw new IgniteCheckedException("Unable to initialize file appender.", e);
-        }
-
-        LevelRangeFilter lvlFilter = new LevelRangeFilter();
-
-        lvlFilter.setLevelMin(Level.DEBUG);
-
-        fileApp.addFilter(lvlFilter);
-
-        impl.addAppender(fileApp);
+        // Configure output that should go to file
+        addRootLoggerAppender(DEBUG, RollingFileAppender.newBuilder()
+                .setName(FILE)
+                .withFileName(fileName)
+                .withFilePattern(fileName + ".%i")
+                .setLayout(DEFAULT_PATTERN_LAYOUT)
+                .withStrategy(DefaultRolloverStrategy.newBuilder().withMax("0").build())
+                .withAppend(false)
+                .build());
 
         // Configure output that should go to System.out
-        ConsoleAppender conApp = new ConsoleAppender(new PatternLayout(fmt), ConsoleAppender.SYSTEM_OUT);
-
-        lvlFilter = new LevelRangeFilter();
-
-        lvlFilter.setLevelMin(Level.DEBUG);
-        lvlFilter.setLevelMax(Level.INFO);
-
-        conApp.addFilter(lvlFilter);
-
-        conApp.activateOptions();
-
-        impl.addAppender(conApp);
+        addRootLoggerAppender(DEBUG, ConsoleAppender.newBuilder()
+                .setName(CONSOLE)
+                .setTarget(SYSTEM_OUT)
+                .setFilter(LevelRangeFilter.createFilter(INFO, DEBUG, ACCEPT, DENY))
+                .setLayout(DEFAULT_PATTERN_LAYOUT)
+                .build());
 
         // Configure output that should go to System.err
-        conApp = new ConsoleAppender(new PatternLayout(fmt), ConsoleAppender.SYSTEM_ERR);
+        addRootLoggerAppender(WARN, ConsoleAppender.newBuilder()
+                .setName(CONSOLE_ERROR)
+                .setTarget(SYSTEM_ERR)
+                .setLayout(DEFAULT_PATTERN_LAYOUT)
+                .build());
 
-        conApp.setThreshold(Level.WARN);
+        Configurator.setRootLevel(INFO);
 
-        conApp.activateOptions();
-
-        impl.addAppender(conApp);
-
-        impl.setLevel(Level.INFO);
-
-        //Logger.getLogger("org.apache.ignite").setLevel(Level.INFO);
-        //Logger.getLogger(GridCacheVersionManager.class).setLevel(Level.DEBUG);
+//        Configurator.setLevel("org.apache.ignite", INFO);
+//        Configurator.setLevel(GridCacheVersionManager.class, DEBUG);
 
         return new GridTestLog4jLogger(false);
     }
@@ -343,11 +326,6 @@
         if (!path.isFile())
             throw new IgniteCheckedException("Provided file path is not a file: " + path);
 
-        // Add no-op logger to remove no-appender warning.
-        Appender app = new NullAppender();
-
-        Logger.getRootLogger().addAppender(app);
-
         ApplicationContext springCtx;
 
         try {
@@ -371,9 +349,6 @@
         if (cfgMap == null)
             throw new IgniteCheckedException("Failed to find a single grid factory configuration in: " + path);
 
-        // Remove previously added no-op logger.
-        Logger.getRootLogger().removeAppender(app);
-
         if (cfgMap.isEmpty())
             throw new IgniteCheckedException("Can't find grid factory configuration in: " + path);
         else if (cfgMap.size() > 1)
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiInverseConnectionLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiInverseConnectionLoggingTest.java
index 4893b4c..401d2a1 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiInverseConnectionLoggingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiInverseConnectionLoggingTest.java
@@ -38,8 +38,8 @@
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.MemorizingAppender;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.apache.log4j.Level;
-import org.apache.log4j.spi.LoggingEvent;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.LogEvent;
 import org.junit.Test;
 
 import static java.util.Collections.singletonList;
@@ -114,8 +114,8 @@
 
         sendFailingMessage(server, clientNode);
 
-        LoggingEvent event = log4jAppender.singleEventSatisfying(
-            evt -> evt.getRenderedMessage().startsWith("Failed to send message to remote node ")
+        LogEvent event = log4jAppender.singleEventSatisfying(
+            evt -> evt.getMessage().getFormattedMessage().startsWith("Failed to send message to remote node ")
         );
 
         assertThat(event.getLevel(), is(Level.WARN));
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiNodeLeftLoggingTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiNodeLeftLoggingTest.java
index 4d30caa..8196d6c 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiNodeLeftLoggingTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiNodeLeftLoggingTest.java
@@ -26,8 +26,8 @@
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.MemorizingAppender;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.apache.log4j.Level;
-import org.apache.log4j.spi.LoggingEvent;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.LogEvent;
 import org.junit.Test;
 
 import static java.util.Collections.singletonList;
@@ -93,8 +93,8 @@
 
         sendFailingMessage(server1, server2Node);
 
-        LoggingEvent event = log4jAppender.singleEventSatisfying(
-            evt -> evt.getRenderedMessage().startsWith("Failed to send message to remote node")
+        LogEvent event = log4jAppender.singleEventSatisfying(
+            evt -> evt.getMessage().getFormattedMessage().startsWith("Failed to send message to remote node")
         );
 
         assertThat(event.getLevel(), is(Level.ERROR));
@@ -143,8 +143,8 @@
 
         sendFailingMessage(server, clientNode);
 
-        LoggingEvent event = log4jAppender.singleEventSatisfying(
-            evt -> evt.getRenderedMessage().startsWith("Failed to send message to remote node")
+        LogEvent event = log4jAppender.singleEventSatisfying(
+            evt -> evt.getMessage().getFormattedMessage().startsWith("Failed to send message to remote node")
         );
 
         assertThat(event.getLevel(), is(Level.WARN));
diff --git a/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java b/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
index 1e0fc9b..468102c 100644
--- a/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
+++ b/modules/core/src/test/java/org/apache/ignite/startup/GridRandomCommandLineLoader.java
@@ -41,9 +41,6 @@
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger;
-import org.apache.log4j.Appender;
-import org.apache.log4j.Logger;
-import org.apache.log4j.varia.NullAppender;
 import org.jetbrains.annotations.Nullable;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
@@ -313,11 +310,6 @@
         if (!path.isFile())
             throw new IgniteCheckedException("Provided file path is not a file: " + path);
 
-        // Add no-op logger to remove no-appender warning.
-        Appender app = new NullAppender();
-
-        Logger.getRootLogger().addAppender(app);
-
         ApplicationContext springCtx;
 
         try {
@@ -341,9 +333,6 @@
         if (cfgMap == null)
             throw new IgniteCheckedException("Failed to find a single grid factory configuration in: " + path);
 
-        // Remove previously added no-op logger.
-        Logger.getRootLogger().removeAppender(app);
-
         if (cfgMap.size() != 1)
             throw new IgniteCheckedException("Spring configuration file should contain exactly 1 grid configuration: " + path);
 
diff --git a/modules/core/src/test/java/org/apache/ignite/startup/GridVmNodesStarter.java b/modules/core/src/test/java/org/apache/ignite/startup/GridVmNodesStarter.java
index 8aeff69..a8de945 100644
--- a/modules/core/src/test/java/org/apache/ignite/startup/GridVmNodesStarter.java
+++ b/modules/core/src/test/java/org/apache/ignite/startup/GridVmNodesStarter.java
@@ -36,9 +36,6 @@
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.util.typedef.G;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.log4j.Appender;
-import org.apache.log4j.Logger;
-import org.apache.log4j.varia.NullAppender;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.FileSystemXmlApplicationContext;
@@ -203,11 +200,6 @@
         if (!path.isFile())
             throw new IgniteCheckedException("Provided file path is not a file: " + path);
 
-        // Add no-op logger to remove no-appender warning.
-        Appender app = new NullAppender();
-
-        Logger.getRootLogger().addAppender(app);
-
         ApplicationContext springCtx;
 
         try {
@@ -231,9 +223,6 @@
         if (cfgMap == null)
             throw new IgniteCheckedException("Failed to find a single grid factory configuration in: " + path);
 
-        // Remove previously added no-op logger.
-        Logger.getRootLogger().removeAppender(app);
-
         if (cfgMap.isEmpty())
             throw new IgniteCheckedException("Can't find grid factory configuration in: " + path);
 
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/MemorizingAppender.java b/modules/core/src/test/java/org/apache/ignite/testframework/MemorizingAppender.java
index a1d78c1..e9fd677 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/MemorizingAppender.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/MemorizingAppender.java
@@ -21,37 +21,35 @@
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.function.Predicate;
-import org.apache.log4j.AppenderSkeleton;
-import org.apache.log4j.Logger;
-import org.apache.log4j.spi.LoggingEvent;
+import org.apache.logging.log4j.core.LogEvent;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.appender.AbstractAppender;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.apache.logging.log4j.core.config.Property;
 
 import static java.util.stream.Collectors.toList;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.hasSize;
 
 /**
- * A Log4j {@link org.apache.log4j.Appender} that memorizes all the events it gets from loggers. These events are made
- * available to the class users.
+ * A Log4j2 {@link org.apache.logging.log4j.core.appender.AbstractAppender} that memorizes all the events it gets from loggers.
+ * These events are made available to the class users.
  */
-public class MemorizingAppender extends AppenderSkeleton {
+public class MemorizingAppender extends AbstractAppender {
     /**
      * Events that were seen by this Appender.
      */
-    private final List<LoggingEvent> events = new CopyOnWriteArrayList<>();
+    private final List<LogEvent> events = new CopyOnWriteArrayList<>();
 
     /** {@inheritDoc} */
-    @Override protected void append(LoggingEvent event) {
+    @Override public void append(LogEvent event) {
         events.add(event);
     }
 
-    /** {@inheritDoc} */
-    @Override public void close() {
-        // no-op
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean requiresLayout() {
-        return false;
+    /** */
+    public MemorizingAppender() {
+        super(MemorizingAppender.class.getName(), null, null, true, Property.EMPTY_ARRAY);
     }
 
     /**
@@ -59,7 +57,7 @@
      *
      * @return All events that were seen by this Appender so far.
      */
-    public List<LoggingEvent> events() {
+    public List<LogEvent> events() {
         return new ArrayList<>(events);
     }
 
@@ -69,9 +67,21 @@
      * @param target Class on whose logger to install this Appender.
      */
     public void installSelfOn(Class<?> target) {
-        Logger logger = Logger.getLogger(target);
+        LoggerContext ctx = LoggerContext.getContext(false);
 
-        logger.addAppender(this);
+        Configuration cfg = ctx.getConfiguration();
+
+        LoggerConfig logCfg = cfg.getLoggers().get(target.getName());
+
+        if (logCfg == null) {
+            logCfg = new LoggerConfig(target.getName(), cfg.getLoggerConfig(target.getName()).getLevel(), true);
+
+            cfg.addLogger(target.getName(), logCfg);
+        }
+
+        logCfg.addAppender(this, null, null);
+
+        ctx.updateLoggers();
     }
 
     /**
@@ -80,9 +90,11 @@
      * @param target Class from whose logger to remove this Appender.
      */
     public void removeSelfFrom(Class<?> target) {
-        Logger logger = Logger.getLogger(target);
+        LoggerConfig logCfg = LoggerContext.getContext(false).getConfiguration().getLoggerConfig(target.getName());
 
-        logger.removeAppender(this);
+        logCfg.removeAppender(getName());
+
+        LoggerContext.getContext(false).updateLoggers();
     }
 
     /**
@@ -92,8 +104,8 @@
      * @param predicate Predicate to use to select the event.
      * @return The single event satisfying the given predicate.
      */
-    public LoggingEvent singleEventSatisfying(Predicate<LoggingEvent> predicate) {
-        List<LoggingEvent> matches = events.stream().filter(predicate).collect(toList());
+    public LogEvent singleEventSatisfying(Predicate<LogEvent> predicate) {
+        List<LogEvent> matches = events.stream().filter(predicate).collect(toList());
 
         assertThat(matches, hasSize(1));
 
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/MemorizingAppenderTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/MemorizingAppenderTest.java
index c32e123..e8bbdb4 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/MemorizingAppenderTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/MemorizingAppenderTest.java
@@ -18,13 +18,16 @@
 package org.apache.ignite.testframework;
 
 import java.util.List;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.spi.LoggingEvent;
+import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LogEvent;
+import org.apache.logging.log4j.core.config.Configurator;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import static org.apache.logging.log4j.Level.DEBUG;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.hasSize;
 import static org.hamcrest.Matchers.is;
@@ -38,6 +41,12 @@
      */
     private final MemorizingAppender appender = new MemorizingAppender();
 
+    static {
+        GridTestLog4jLogger.removeAllRootLoggerAppenders();
+
+        Configurator.setRootLevel(DEBUG);
+    }
+
     /***/
     @Before
     public void installAppender() {
@@ -55,15 +64,15 @@
      */
     @Test
     public void memorizesLoggingEvents() {
-        Logger.getLogger(MemorizingAppenderTest.class).info("Hello!");
+        LogManager.getLogger(MemorizingAppenderTest.class).info("Hello!");
 
-        List<LoggingEvent> events = appender.events();
+        List<LogEvent> events = appender.events();
 
         assertThat(events, hasSize(1));
 
-        LoggingEvent event = events.get(0);
+        LogEvent event = events.get(0);
 
         assertThat(event.getLevel(), is(Level.INFO));
-        assertThat(event.getRenderedMessage(), is("Hello!"));
+        assertThat(event.getMessage().getFormattedMessage(), is("Hello!"));
     }
 }
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java b/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
index 2cd087bf..edadc65 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
@@ -32,7 +32,8 @@
 import org.apache.ignite.binary.BinaryTypeConfiguration;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.log4j.xml.DOMConfigurator;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.LoggerConfig;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -127,16 +128,16 @@
         String cfgFile = System.getProperty("IGNITE_TEST_PROP_LOG4J_FILE");
 
         if (cfgFile == null)
-            cfgFile = "log4j-test.xml";
+            cfgFile = "log4j2-test.xml";
 
         File log4jFile = getTestConfigurationFile(user, cfgFile);
 
         if (log4jFile == null)
             log4jFile = getTestConfigurationFile(null, cfgFile);
 
-        DOMConfigurator.configure(log4jFile.getAbsolutePath());
+        Configurator.initialize(LoggerConfig.ROOT, log4jFile.getAbsolutePath());
 
-        System.out.println("Configured log4j from: " + log4jFile);
+        System.out.println("Configured log4j2 from: " + log4jFile);
     }
 
     /** */
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index 70144a1..cf53ea1 100755
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@ -126,13 +126,14 @@
 import org.apache.ignite.testframework.junits.multijvm.IgniteNodeRunner;
 import org.apache.ignite.testframework.junits.multijvm.IgniteProcessProxy;
 import org.apache.ignite.thread.IgniteThread;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.Priority;
-import org.apache.log4j.RollingFileAppender;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.appender.ConsoleAppender;
+import org.apache.logging.log4j.core.appender.RollingFileAppender;
+import org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy;
+import org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.LoggerConfig;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.junit.After;
@@ -171,6 +172,13 @@
 import static org.apache.ignite.testframework.GridTestUtils.setFieldValue;
 import static org.apache.ignite.testframework.config.GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER;
 import static org.apache.ignite.testframework.config.GridTestProperties.IGNITE_CFG_PREPROCESSOR_CLS;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.CONSOLE_ERROR;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.DEFAULT_PATTERN_LAYOUT;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.FILE;
+import static org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger.addRootLoggerAppender;
+import static org.apache.logging.log4j.Level.DEBUG;
+import static org.apache.logging.log4j.Level.WARN;
+import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_ERR;
 
 /**
  * Common abstract test for Ignite tests.
@@ -202,7 +210,7 @@
     private static final Map<Class<?>, IgniteTestResources> tests = new ConcurrentHashMap<>();
 
     /** Loggers with changed log level for test's purposes. */
-    private static final Map<Logger, Level> changedLevels = new ConcurrentHashMap<>();
+    private static final Map<String, Level> changedLevels = new ConcurrentHashMap<>();
 
     /** */
     private static final MemoryMXBean memoryMxBean = ManagementFactory.getMemoryMXBean();
@@ -345,8 +353,7 @@
      */
     protected void afterTest() throws Exception {
         try {
-            for (Map.Entry<Logger, Level> entry : changedLevels.entrySet())
-                entry.getKey().setLevel(entry.getValue());
+            changedLevels.forEach(Configurator::setLevel);
         }
         finally {
             changedLevels.clear();
@@ -462,13 +469,13 @@
      * default in {@link #afterTest()}.
      */
     protected final void setLoggerDebugLevel() {
-        Logger logger = LogManager.getLogger("org.apache.ignite");
+        String logName = "org.apache.ignite";
 
-        Level lvl = logger.getLevel() == null ? LogManager.getRootLogger().getLevel() : logger.getLevel();
+        LoggerConfig logCfg = LoggerContext.getContext(false).getConfiguration().getLoggerConfig(logName);
 
-        assertNull(logger + " level: " + Level.DEBUG, changedLevels.put(logger, lvl));
+        assertNull(logCfg + " level: " + Level.DEBUG, changedLevels.put(logName, logCfg.getLevel()));
 
-        logger.setLevel(Level.DEBUG);
+        Configurator.setLevel(logName, DEBUG);
     }
 
     /**
@@ -479,43 +486,31 @@
      * @param cat Category.
      * @param cats Additional categories.
      */
-    @SuppressWarnings({"deprecation"})
     protected void resetLog4j(Level log4jLevel, boolean logToFile, String cat, String... cats)
         throws IgniteCheckedException {
         for (String c : F.concat(false, cat, F.asList(cats)))
-            Logger.getLogger(c).setLevel(log4jLevel);
+            Configurator.setLevel(c, log4jLevel);
 
         if (logToFile) {
-            Logger log4j = Logger.getRootLogger();
-
-            log4j.removeAllAppenders();
+            GridTestLog4jLogger.removeAllRootLoggerAppenders();
 
             // Console appender.
-            ConsoleAppender c = new ConsoleAppender();
-
-            c.setName("CONSOLE_ERR");
-            c.setTarget("System.err");
-            c.setThreshold(Priority.WARN);
-            c.setLayout(new PatternLayout("[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"));
-
-            c.activateOptions();
-
-            log4j.addAppender(c);
+            addRootLoggerAppender(WARN, ConsoleAppender.newBuilder()
+                .setName(CONSOLE_ERROR)
+                .setTarget(SYSTEM_ERR)
+                .setLayout(DEFAULT_PATTERN_LAYOUT)
+                .build());
 
             // File appender.
-            RollingFileAppender file = new RollingFileAppender();
-
-            file.setName("FILE");
-            file.setThreshold(log4jLevel);
-            file.setFile(home() + "/work/log/ignite.log");
-            file.setAppend(false);
-            file.setMaxFileSize("10MB");
-            file.setMaxBackupIndex(10);
-            file.setLayout(new PatternLayout("[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"));
-
-            file.activateOptions();
-
-            log4j.addAppender(file);
+            addRootLoggerAppender(log4jLevel, RollingFileAppender.newBuilder()
+                .setName(FILE)
+                .withFileName(home() + "/work/log/ignite.log")
+                .withFilePattern(home() + "/work/log/ignite.log.%i")
+                .withAppend(false)
+                .withPolicy(SizeBasedTriggeringPolicy.createPolicy("10MB"))
+                .withStrategy(DefaultRolloverStrategy.newBuilder().withMax("10").build())
+                .setLayout(DEFAULT_PATTERN_LAYOUT)
+                .build());
         }
     }
 
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridLog4jRollingFileAppender.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridLog4jRollingFileAppender.java
deleted file mode 100644
index 98841d8..0000000
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridLog4jRollingFileAppender.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.testframework.junits.logger;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.UUID;
-import org.apache.ignite.IgniteSystemProperties;
-import org.apache.ignite.internal.util.typedef.internal.A;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.logger.LoggerNodeIdAndApplicationAware;
-import org.apache.log4j.Layout;
-import org.apache.log4j.RollingFileAppender;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Log4J {@link org.apache.log4j.RollingFileAppender} with added support for grid node IDs.
- */
-public class GridLog4jRollingFileAppender extends RollingFileAppender implements LoggerNodeIdAndApplicationAware {
-    /** Node ID. */
-    private UUID nodeId;
-
-    /** Basic log file name. */
-    private String baseFileName;
-
-    /**
-     * Default constructor (does not do anything).
-     */
-    public GridLog4jRollingFileAppender() {
-        init();
-    }
-
-    /**
-     * Instantiate a FileAppender with given parameters.
-     *
-     * @param layout Layout.
-     * @param filename File name.
-     * @throws java.io.IOException If failed.
-     */
-    public GridLog4jRollingFileAppender(Layout layout, String filename) throws IOException {
-        super(layout, filename);
-
-        init();
-    }
-
-    /**
-     * Instantiate a FileAppender with given parameters.
-     *
-     * @param layout Layout.
-     * @param filename File name.
-     * @param append Append flag.
-     * @throws java.io.IOException If failed.
-     */
-    public GridLog4jRollingFileAppender(Layout layout, String filename, boolean append) throws IOException {
-        super(layout, filename, append);
-
-        init();
-    }
-
-    /**
-     * Initializes appender.
-     */
-    private void init() {
-        GridTestLog4jLogger.addAppender(this);
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized void setApplicationAndNode(@Nullable String application, UUID nodeId) {
-        A.notNull(nodeId, "nodeId");
-
-        this.nodeId = nodeId;
-
-        if (fileName != null) { // fileName could be null if IGNITE_HOME is not defined.
-            if (baseFileName == null)
-                baseFileName = fileName;
-
-            fileName = U.nodeIdLogFileName(nodeId, baseFileName);
-        }
-        else {
-            String tmpDir = IgniteSystemProperties.getString("java.io.tmpdir");
-
-            if (tmpDir != null) {
-                baseFileName = new File(tmpDir, "ignite.log").getAbsolutePath();
-
-                fileName = U.nodeIdLogFileName(nodeId, baseFileName);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized UUID getNodeId() {
-        return nodeId;
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized void setFile(String fileName, boolean fileAppend, boolean bufIO, int bufSize)
-        throws IOException {
-        if (nodeId != null)
-            super.setFile(fileName, fileAppend, bufIO, bufSize);
-    }
-}
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLogger.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLogger.java
index 6563e1c..53b39f3 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLogger.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLogger.java
@@ -21,7 +21,6 @@
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Enumeration;
 import java.util.UUID;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
@@ -29,33 +28,49 @@
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.C1;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteClosure;
 import org.apache.ignite.logger.LoggerNodeIdAndApplicationAware;
-import org.apache.log4j.Appender;
-import org.apache.log4j.Category;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.FileAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.varia.LevelRangeFilter;
-import org.apache.log4j.xml.DOMConfigurator;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.appender.ConsoleAppender;
+import org.apache.logging.log4j.core.appender.FileAppender;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.DefaultConfiguration;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilder;
+import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilderFactory;
+import org.apache.logging.log4j.core.config.builder.api.RootLoggerComponentBuilder;
+import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration;
+import org.apache.logging.log4j.core.filter.LevelRangeFilter;
+import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_CONSOLE_APPENDER;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_QUIET;
+import static org.apache.logging.log4j.Level.INFO;
+import static org.apache.logging.log4j.Level.OFF;
+import static org.apache.logging.log4j.Level.TRACE;
+import static org.apache.logging.log4j.core.Filter.Result.ACCEPT;
+import static org.apache.logging.log4j.core.Filter.Result.DENY;
+import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_ERR;
+import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_OUT;
 
 /**
  * Log4j-based implementation for logging. This logger should be used
- * by loaders that have prefer <a target=_new href="http://logging.apache.org/log4j/1.2/">log4j</a>-based logging.
+ * by loaders that have prefer <a target=_new href="https://logging.apache.org/log4j/2.x/">log4j2</a>-based logging.
  * <p>
  * Here is a typical example of configuring log4j logger in Ignite configuration file:
  * <pre name="code" class="xml">
  *      &lt;property name="gridLogger"&gt;
- *          &lt;bean class="org.apache.ignite.logger.log4j.Log4JLogger"&gt;
+ *          &lt;bean class="org.apache.ignite.logger.log4j.Log4J2Logger"&gt;
  *              &lt;constructor-arg type="java.lang.String" value="config/ignite-log4j.xml"/&gt;
  *          &lt;/bean>
  *      &lt;/property&gt;
@@ -64,13 +79,13 @@
  * <pre name="code" class="java">
  *      IgniteConfiguration cfg = new IgniteConfiguration();
  *      ...
- *      URL xml = U.resolveIgniteUrl("config/custom-log4j.xml");
- *      IgniteLogger log = new Log4JLogger(xml);
+ *      URL xml = U.resolveIgniteUrl("config/custom-log42j.xml");
+ *      IgniteLogger log = new Log4J2Logger(xml);
  *      ...
  *      cfg.setGridLogger(log);
  * </pre>
  *
- * Please take a look at <a target=_new href="http://logging.apache.org/log4j/1.2/index.html>Apache Log4j 1.2</a>
+ * Please take a look at <a target=_new href="https://logging.apache.org/log4j/2.x/>Apache Log4j 2.x</a>
  * for additional information.
  * <p>
  * It's recommended to use Ignite logger injection instead of using/instantiating
@@ -78,6 +93,26 @@
  * injection.
  */
 public class GridTestLog4jLogger implements IgniteLogger, LoggerNodeIdAndApplicationAware {
+    /** */
+    public static final String FILE = "FILE";
+
+    /** */
+    public static final String CONSOLE = "CONSOLE";
+
+    /** */
+    public static final String CONSOLE_ERROR = "CONSOLE_ERR";
+
+    /** */
+    private static final String NODE_ID = "nodeId";
+
+    /** */
+    private static final String APP_ID = "appId";
+
+    /** */
+    public static final PatternLayout DEFAULT_PATTERN_LAYOUT = PatternLayout.newBuilder()
+        .withPattern("[%d{ISO8601}][%-5p][%t][%c{1}] %m%n")
+        .build();
+
     /** Appenders. */
     private static Collection<FileAppender> fileAppenders = new GridConcurrentHashSet<>();
 
@@ -110,10 +145,8 @@
      * Creates new logger and automatically detects if root logger already
      * has appenders configured. If it does not, the root logger will be
      * configured with default appender (analogous to calling
-     * {@link #GridTestLog4jLogger(boolean) Log4jLogger(boolean)}
-     * with parameter {@code true}, otherwise, existing appenders will be used (analogous
-     * to calling {@link #GridTestLog4jLogger(boolean) Log4jLogger(boolean)}
-     * with parameter {@code false}).
+     * {@link #GridTestLog4jLogger(boolean) Log4j2Logger(boolean)}
+     * with parameter {@code true}, otherwise, existing appenders will be used.
      */
     public GridTestLog4jLogger() {
         this(!isConfigured());
@@ -127,15 +160,15 @@
      * @param init If {@code true}, then a default console appender with
      *      following pattern layout will be created: {@code %d{ISO8601} %-5p [%c{1}] %m%n}.
      *      If {@code false}, then no implicit initialization will take place,
-     *      and {@code Log4j} should be configured prior to calling this
+     *      and {@code Log4j2} should be configured prior to calling this
      *      constructor.
      */
     public GridTestLog4jLogger(boolean init) {
-        impl = Logger.getRootLogger();
+        impl = LogManager.getRootLogger();
 
         if (init) {
             // Implementation has already been inited, passing NULL.
-            addConsoleAppenderIfNeeded(Level.INFO, null);
+            addConsoleAppenderIfNeeded(INFO, null);
 
             quiet = quiet0;
         }
@@ -150,7 +183,7 @@
      *
      * @param impl Log4j implementation to use.
      */
-    protected GridTestLog4jLogger(final Logger impl) {
+    public GridTestLog4jLogger(final Logger impl) {
         assert impl != null;
 
         addConsoleAppenderIfNeeded(null, new C1<Boolean, Logger>() {
@@ -171,21 +204,21 @@
      */
     public GridTestLog4jLogger(String path) throws IgniteCheckedException {
         if (path == null)
-            throw new IgniteCheckedException("Configuration XML file for Log4j must be specified.");
+            throw new IgniteCheckedException("Configuration XML file for Log4j2 must be specified.");
 
         this.cfg = path;
 
         final URL cfgUrl = U.resolveIgniteUrl(path);
 
         if (cfgUrl == null)
-            throw new IgniteCheckedException("Log4j configuration path was not found: " + path);
+            throw new IgniteCheckedException("Log4j2 configuration path was not found: " + path);
 
         addConsoleAppenderIfNeeded(null, new C1<Boolean, Logger>() {
             @Override public Logger apply(Boolean init) {
                 if (init)
-                    DOMConfigurator.configure(cfgUrl);
+                    Configurator.initialize(LoggerConfig.ROOT, cfgUrl.getPath());
 
-                return Logger.getRootLogger();
+                return LogManager.getRootLogger();
             }
         });
 
@@ -203,16 +236,16 @@
             throw new IgniteCheckedException("Configuration XML file for Log4j must be specified.");
 
         if (!cfgFile.exists() || cfgFile.isDirectory())
-            throw new IgniteCheckedException("Log4j configuration path was not found or is a directory: " + cfgFile);
+            throw new IgniteCheckedException("Log4j2 configuration path was not found or is a directory: " + cfgFile);
 
         cfg = cfgFile.getAbsolutePath();
 
         addConsoleAppenderIfNeeded(null, new C1<Boolean, Logger>() {
             @Override public Logger apply(Boolean init) {
                 if (init)
-                    DOMConfigurator.configure(cfg);
+                    Configurator.initialize(LoggerConfig.ROOT, cfg);
 
-                return Logger.getRootLogger();
+                return LogManager.getRootLogger();
             }
         });
 
@@ -234,9 +267,9 @@
         addConsoleAppenderIfNeeded(null, new C1<Boolean, Logger>() {
             @Override public Logger apply(Boolean init) {
                 if (init)
-                    DOMConfigurator.configure(cfgUrl);
+                    Configurator.initialize(LoggerConfig.ROOT, cfg);
 
-                return Logger.getRootLogger();
+                return LogManager.getRootLogger();
             }
         });
 
@@ -249,7 +282,7 @@
      * @return {@code True} if log4j was already configured, {@code false} otherwise.
      */
     public static boolean isConfigured() {
-        return Logger.getRootLogger().getAllAppenders().hasMoreElements();
+        return !(LoggerContext.getContext(false).getConfiguration() instanceof DefaultConfiguration);
     }
 
     /**
@@ -258,14 +291,14 @@
      * @param level Log level to set.
      */
     public void setLevel(Level level) {
-        impl.setLevel(level);
+        Configurator.setLevel(impl.getName(), level);
     }
 
     /** {@inheritDoc} */
     @Nullable @Override public String fileName() {
         FileAppender fapp = F.first(fileAppenders);
 
-        return fapp != null ? fapp.getFile() : null;
+        return fapp != null ? fapp.getFileName() : null;
     }
 
     /**
@@ -299,61 +332,17 @@
 
             boolean quiet = Boolean.valueOf(System.getProperty(IGNITE_QUIET, "true"));
 
-            boolean consoleAppenderFound = false;
-            Category rootCategory = null;
-            ConsoleAppender errAppender = null;
+            T2<Boolean, Boolean> consoleAppendersFound = isConsoleAppendersConfigured();
 
-            for (Category l = impl; l != null; ) {
-                if (!consoleAppenderFound) {
-                    for (Enumeration appenders = l.getAllAppenders(); appenders.hasMoreElements(); ) {
-                        Appender appender = (Appender)appenders.nextElement();
-
-                        if (appender instanceof ConsoleAppender) {
-                            if ("CONSOLE_ERR".equals(appender.getName())) {
-                                // Treat CONSOLE_ERR appender as a system one and don't count it.
-                                errAppender = (ConsoleAppender)appender;
-
-                                continue;
-                            }
-
-                            consoleAppenderFound = true;
-
-                            break;
-                        }
-                    }
-                }
-
-                if (l.getParent() == null) {
-                    rootCategory = l;
-
-                    break;
-                }
-                else
-                    l = l.getParent();
-            }
-
-            if (consoleAppenderFound && quiet)
+            if (consoleAppendersFound.get1() && quiet)
                 // User configured console appender, but log is quiet.
                 quiet = false;
 
-            if (!consoleAppenderFound && !quiet && Boolean.valueOf(System.getProperty(IGNITE_CONSOLE_APPENDER, "true"))) {
-                // Console appender not found => we've looked through all categories up to root.
-                assert rootCategory != null;
-
-                // User launched ignite in verbose mode and did not add console appender with INFO level
-                // to configuration and did not set IGNITE_CONSOLE_APPENDER to false.
-                if (errAppender != null) {
-                    rootCategory.addAppender(createConsoleAppender(Level.INFO));
-
-                    if (errAppender.getThreshold() == Level.ERROR)
-                        errAppender.setThreshold(Level.WARN);
-                }
-                else
-                    // No error console appender => create console appender with no level limit.
-                    rootCategory.addAppender(createConsoleAppender(Level.OFF));
+            if (!consoleAppendersFound.get1() && !quiet && Boolean.valueOf(System.getProperty(IGNITE_CONSOLE_APPENDER, "true"))) {
+                configureConsoleAppender(consoleAppendersFound.get2() ? INFO : OFF);
 
                 if (logLevel != null)
-                    impl.setLevel(logLevel);
+                    Configurator.setLevel(impl.getName(), logLevel);
             }
 
             quiet0 = quiet;
@@ -361,26 +350,80 @@
         }
     }
 
+    /** @return Pair of flags that determines whether SYSTEM_OUT and SYSTEM_ERR appenders are configured respectively. */
+    private T2<Boolean, Boolean> isConsoleAppendersConfigured() {
+        Configuration cfg = LoggerContext.getContext(false).getConfiguration();
+
+        if (cfg instanceof DefaultConfiguration)
+            return new T2<>(false, false);
+
+        boolean sysOut = false;
+        boolean sysErr = false;
+
+        for (
+            LoggerConfig logCfg = cfg.getLoggerConfig(impl.getName());
+            logCfg != null && (!sysOut || !sysErr);
+            logCfg = logCfg.getParent()
+        ) {
+            for (Appender appender : logCfg.getAppenders().values()) {
+                if (appender instanceof ConsoleAppender) {
+                    if (((ConsoleAppender)appender).getTarget() == SYSTEM_ERR)
+                        sysErr = true;
+
+                    if (((ConsoleAppender)appender).getTarget() == SYSTEM_OUT)
+                        sysOut = true;
+                }
+            }
+        }
+
+        return new T2<>(sysOut, sysErr);
+    }
+
     /**
      * Creates console appender with some reasonable default logging settings.
      *
-     * @param maxLevel Max logging level.
-     * @return New console appender.
+     * @param minLvl Minimal logging level.
+     * @return Logger with auto configured console appender.
      */
-    private Appender createConsoleAppender(Level maxLevel) {
-        String fmt = "[%d{ISO8601}][%-5p][%t][%c{1}] %m%n";
+    public Logger configureConsoleAppender(Level minLvl) {
+        // from http://logging.apache.org/log4j/2.x/manual/customconfig.html
+        LoggerContext ctx = LoggerContext.getContext(false);
 
-        // Configure output that should go to System.out
-        Appender app = new ConsoleAppender(new PatternLayout(fmt), ConsoleAppender.SYSTEM_OUT);
+        Configuration cfg = ctx.getConfiguration();
 
-        LevelRangeFilter lvlFilter = new LevelRangeFilter();
+        if (cfg instanceof DefaultConfiguration) {
+            ConfigurationBuilder<BuiltConfiguration> cfgBuilder = ConfigurationBuilderFactory.newConfigurationBuilder();
 
-        lvlFilter.setLevelMin(Level.TRACE);
-        lvlFilter.setLevelMax(maxLevel);
+            RootLoggerComponentBuilder rootLog = cfgBuilder.newRootLogger(INFO);
 
-        app.addFilter(lvlFilter);
+            cfg = cfgBuilder.add(rootLog).build();
 
-        return app;
+            addConsoleAppender(cfg, minLvl);
+
+            ctx.reconfigure(cfg);
+        }
+        else {
+            addConsoleAppender(cfg, minLvl);
+
+            ctx.updateLoggers();
+        }
+
+        return ctx.getRootLogger();
+    }
+
+    /** */
+    private void addConsoleAppender(Configuration logCfg, Level minLvl) {
+        Appender consoleApp = ConsoleAppender.newBuilder()
+            .setName(CONSOLE)
+            .setTarget(SYSTEM_OUT)
+            .setLayout(DEFAULT_PATTERN_LAYOUT)
+            .setFilter(LevelRangeFilter.createFilter(minLvl, TRACE, ACCEPT, DENY))
+            .build();
+
+        consoleApp.start();
+
+        logCfg.addAppender(consoleApp);
+        logCfg.getRootLogger().addAppender(consoleApp, Level.TRACE, null);
     }
 
     /**
@@ -411,13 +454,8 @@
 
         this.nodeId = nodeId;
 
-        for (FileAppender a : fileAppenders) {
-            if (a instanceof LoggerNodeIdAndApplicationAware) {
-                ((LoggerNodeIdAndApplicationAware)a).setApplicationAndNode(application, nodeId);
-
-                a.activateOptions();
-            }
-        }
+        System.setProperty(NODE_ID, U.id8(nodeId));
+        System.setProperty(APP_ID, application != null ? application : "ignite");
     }
 
     /** {@inheritDoc} */
@@ -434,7 +472,7 @@
         Collection<String> res = new ArrayList<>(fileAppenders.size());
 
         for (FileAppender a : fileAppenders)
-            res.add(a.getFile());
+            res.add(a.getFileName());
 
         return res;
     }
@@ -449,9 +487,11 @@
      * @return {@link org.apache.ignite.IgniteLogger} wrapper around log4j logger.
      */
     @Override public GridTestLog4jLogger getLogger(Object ctgr) {
-        return new GridTestLog4jLogger(ctgr == null ? Logger.getRootLogger() :
-            ctgr instanceof Class ? Logger.getLogger(((Class<?>)ctgr).getName()) :
-                Logger.getLogger(ctgr.toString()));
+        return new GridTestLog4jLogger(ctgr == null
+            ? LogManager.getRootLogger()
+            : ctgr instanceof Class
+                ? LogManager.getLogger(((Class<?>)ctgr).getName())
+                : LogManager.getLogger(ctgr.toString()));
     }
 
     /** {@inheritDoc} */
@@ -528,4 +568,46 @@
     @Override public String toString() {
         return S.toString(GridTestLog4jLogger.class, this, "config", cfg);
     }
+
+    /** */
+    public static void removeAllRootLoggerAppenders() {
+        LoggerConfig rootLogCfg = LoggerContext.getContext(false).getConfiguration().getRootLogger();
+
+        for (Appender app : rootLogCfg.getAppenders().values()) {
+            rootLogCfg.removeAppender(app.getName());
+
+            app.stop();
+        }
+
+        LoggerContext.getContext(false).updateLoggers();
+    }
+
+    /** */
+    public static void addRootLoggerAppender(Level lvl, Appender app) {
+        LoggerContext ctx = LoggerContext.getContext(false);
+
+        app.start();
+
+        ctx.getConfiguration().addAppender(app);
+        ctx.getConfiguration().getRootLogger().addAppender(app, lvl, null);
+
+        ctx.updateLoggers();
+    }
+
+    /** */
+    public static void removeRootLoggerAppender(String name) {
+        LoggerConfig rootLogCfg = LoggerContext.getContext(false).getConfiguration().getRootLogger();
+
+        Appender app = rootLogCfg.getAppenders().get(name);
+
+        if (app == null)
+            return;
+
+        app.stop();
+
+        rootLogCfg.removeAppender(name);
+
+        LoggerContext.getContext(false).updateLoggers();
+
+    }
 }
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLoggerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLoggerSelfTest.java
index 9b20612..8f6ee15 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLoggerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLoggerSelfTest.java
@@ -19,8 +19,10 @@
 
 import org.apache.ignite.internal.util.lang.RunnableX;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.Configurator;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -46,20 +48,20 @@
     private static final GridTestLog4jLogger LOGGER = new GridTestLog4jLogger();
 
     /** Default root level. */
-    private static final Level defaultRootLevel = Logger.getRootLogger().getLevel();
+    private static final Level defaultRootLevel = LogManager.getRootLogger().getLevel();
 
     /** */
     @BeforeClass
     public static void beforeTests() {
-        Logger.getRootLogger().setLevel(Level.WARN);
+        Configurator.setRootLevel(Level.WARN);
     }
 
     /** */
     @AfterClass
     public static void afterTests() {
-        Logger.getRootLogger().setLevel(defaultRootLevel);
+        Configurator.setRootLevel(defaultRootLevel);
 
-        assertEquals(defaultRootLevel, Logger.getRootLogger().getLevel());
+        assertEquals(defaultRootLevel, LoggerContext.getContext(false).getConfiguration().getRootLogger().getLevel());
     }
 
     /** */
diff --git a/modules/dev-utils/ignite-modules-test/build.gradle b/modules/dev-utils/ignite-modules-test/build.gradle
index 395a4d2..b9e7a2f 100644
--- a/modules/dev-utils/ignite-modules-test/build.gradle
+++ b/modules/dev-utils/ignite-modules-test/build.gradle
@@ -80,7 +80,6 @@
     }*/
     compile group: 'org.apache.ignite', name: 'ignite-ml', version: ignVer
 
-    compile group: 'org.apache.ignite', name: 'ignite-log4j', version: ignVer
     compile group: 'org.apache.ignite', name: 'ignite-log4j2', version: ignVer
     compile group: 'org.apache.ignite', name: 'ignite-slf4j', version: ignVer
 
diff --git a/modules/dev-utils/pom.xml b/modules/dev-utils/pom.xml
index 8601d38..c1f37a0 100644
--- a/modules/dev-utils/pom.xml
+++ b/modules/dev-utils/pom.xml
@@ -73,8 +73,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/modules/direct-io/pom.xml b/modules/direct-io/pom.xml
index 14554c5..bcae808 100644
--- a/modules/direct-io/pom.xml
+++ b/modules/direct-io/pom.xml
@@ -101,8 +101,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/ducktests/tests/ignitetest/tests/control_utility/consistency_test.py b/modules/ducktests/tests/ignitetest/tests/control_utility/consistency_test.py
index 0ab8db6..80b65b3 100644
--- a/modules/ducktests/tests/ignitetest/tests/control_utility/consistency_test.py
+++ b/modules/ducktests/tests/ignitetest/tests/control_utility/consistency_test.py
@@ -75,7 +75,7 @@
 
             cfg_file = f"{ignites.config_dir}/{cfg_filename}"
 
-            ignites.exec_command(node, f"cp {ignites.home_dir}/config/ignite-log4j2.xml {cfg_file}")
+            ignites.exec_command(node, f"cp {ignites.home_dir}/config/ignite-log4j.xml {cfg_file}")
 
             orig = "${sys:IGNITE_HOME}/work/log".replace('/', '\\/')
             fixed = ignites.log_dir.replace('/', '\\/')
diff --git a/modules/extdata/logo/pom.xml b/modules/extdata/logo/pom.xml
index b034378..3cddb24 100644
--- a/modules/extdata/logo/pom.xml
+++ b/modules/extdata/logo/pom.xml
@@ -79,8 +79,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/modules/indexing/pom.xml b/modules/indexing/pom.xml
index b5c6c17..adf7a38 100644
--- a/modules/indexing/pom.xml
+++ b/modules/indexing/pom.xml
@@ -112,8 +112,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsViewsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsViewsTest.java
index c31c269..b0ca914 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsViewsTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/stat/StatisticsViewsTest.java
@@ -28,8 +28,8 @@
 import org.apache.ignite.internal.processors.query.stat.config.StatisticsColumnOverrides;
 import org.apache.ignite.internal.processors.query.stat.config.StatisticsObjectConfiguration;
 import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.Configurator;
 import org.junit.Test;
 
 /**
@@ -171,7 +171,7 @@
     public void testEnforceStatisticValues() throws Exception {
         long size = SMALL_SIZE;
 
-        Logger.getLogger(StatisticsProcessor.class).setLevel(Level.TRACE);
+        Configurator.setLevel(StatisticsProcessor.class.getName(), Level.TRACE);
         ObjectStatisticsImpl smallStat = (ObjectStatisticsImpl)statisticsMgr(0).getLocalStatistics(SMALL_KEY);
 
         assertNotNull(smallStat);
diff --git a/modules/jcl/src/main/java/org/apache/ignite/logger/jcl/JclLogger.java b/modules/jcl/src/main/java/org/apache/ignite/logger/jcl/JclLogger.java
index e9268b1..309eed3 100644
--- a/modules/jcl/src/main/java/org/apache/ignite/logger/jcl/JclLogger.java
+++ b/modules/jcl/src/main/java/org/apache/ignite/logger/jcl/JclLogger.java
@@ -37,7 +37,7 @@
  *      &lt;property name="gridLogger"&gt;
  *          &lt;bean class="org.apache.ignite.logger.jcl.JclLogger"&gt;
  *              &lt;constructor-arg type="org.apache.commons.logging.Log"&gt;
- *                  &lt;bean class="org.apache.commons.logging.impl.Log4JLogger"&gt;
+ *                  &lt;bean class="org.apache.commons.logging.impl.Log42JLogger"&gt;
  *                      &lt;constructor-arg type="java.lang.String" value="config/ignite-log4j.xml"/&gt;
  *                  &lt;/bean&gt;
  *              &lt;/constructor-arg&gt;
@@ -57,7 +57,7 @@
  * <pre name="code" class="java">
  *      IgniteConfiguration cfg = new IgniteConfiguration();
  *      ...
- *      IgniteLogger log = new JclLogger(new Log4JLogger("config/ignite-log4j.xml"));
+ *      IgniteLogger log = new JclLogger(new Log4J2Logger("config/ignite-log4j.xml"));
  *      ...
  *      cfg.setGridLogger(log);
  * </pre>
diff --git a/modules/jta/pom.xml b/modules/jta/pom.xml
index 64abac5..1346a1e 100644
--- a/modules/jta/pom.xml
+++ b/modules/jta/pom.xml
@@ -47,8 +47,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/kubernetes/pom.xml b/modules/kubernetes/pom.xml
index 8282484..830c4f8 100644
--- a/modules/kubernetes/pom.xml
+++ b/modules/kubernetes/pom.xml
@@ -79,8 +79,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/log4j/README.txt b/modules/log4j/README.txt
deleted file mode 100644
index 4bd1b4b..0000000
--- a/modules/log4j/README.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-Apache Ignite Log4J Module
---------------------------
-
-Apache Ignite Log4J module provides IgniteLogger implementation based on Apache Log4J.
-
-To enable Log4J module when starting a standalone node, move 'optional/ignite-log4j' folder to
-'libs' folder before running 'ignite.{sh|bat}' script. The content of the module folder will
-be added to classpath in this case.
-
-Importing Log4J Module In Maven Project
----------------------------------------
-
-If you are using Maven to manage dependencies of your project, you can add Log4J module
-dependency like this (replace '${ignite.version}' with actual Ignite version you are
-interested in):
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
-                        http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    ...
-    <dependencies>
-        ...
-        <dependency>
-            <groupId>org.apache.ignite</groupId>
-            <artifactId>ignite-log4j</artifactId>
-            <version>${ignite.version}</version>
-        </dependency>
-        ...
-    </dependencies>
-    ...
-</project>
diff --git a/modules/log4j/licenses/apache-2.0.txt b/modules/log4j/licenses/apache-2.0.txt
deleted file mode 100644
index d645695..0000000
--- a/modules/log4j/licenses/apache-2.0.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/modules/log4j/pom.xml b/modules/log4j/pom.xml
deleted file mode 100644
index 0379cc4..0000000
--- a/modules/log4j/pom.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!--
-    POM file.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.ignite</groupId>
-        <artifactId>ignite-parent-internal</artifactId>
-        <version>${revision}</version>
-        <relativePath>../../parent-internal/pom.xml</relativePath>
-    </parent>
-
-    <artifactId>ignite-log4j</artifactId>
-
-    <url>http://ignite.apache.org</url>
-
-    <dependencies>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-core</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-core</artifactId>
-            <type>test-jar</type>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-tools</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <version>2.8.2</version>
-                <configuration>
-                    <skip>false</skip>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JDailyRollingFileAppender.java b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JDailyRollingFileAppender.java
deleted file mode 100644
index 975e486..0000000
--- a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JDailyRollingFileAppender.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.IOException;
-import org.apache.ignite.internal.util.typedef.internal.A;
-import org.apache.ignite.lang.IgniteClosure;
-import org.apache.log4j.DailyRollingFileAppender;
-import org.apache.log4j.Layout;
-
-/**
- * Log4J {@link DailyRollingFileAppender} with added support for grid node IDs.
- */
-public class Log4JDailyRollingFileAppender extends DailyRollingFileAppender implements Log4jFileAware {
-    /** Basic log file name. */
-    private String baseFileName;
-
-    /**
-     * Default constructor (does not do anything).
-     */
-    public Log4JDailyRollingFileAppender() {
-        init();
-    }
-
-    /**
-     * Instantiate a FileAppender with given parameters.
-     *
-     * @param layout Layout.
-     * @param filename File name.
-     * @param datePtrn Date pattern.
-     * @throws IOException If failed.
-     */
-    public Log4JDailyRollingFileAppender(Layout layout, String filename, String datePtrn) throws IOException {
-        super(layout, filename, datePtrn);
-
-        init();
-    }
-
-    /**
-     *
-     */
-    private void init() {
-        Log4JLogger.addAppender(this);
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized void updateFilePath(IgniteClosure<String, String> filePathClos) {
-        A.notNull(filePathClos, "filePathClos");
-
-        if (baseFileName == null)
-            baseFileName = fileName;
-
-        fileName = filePathClos.apply(baseFileName);
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized void setFile(String fileName, boolean fileAppend, boolean bufIO, int bufSize)
-        throws IOException {
-        if (baseFileName != null)
-            super.setFile(fileName, fileAppend, bufIO, bufSize);
-    }
-}
diff --git a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JExternallyRolledFileAppender.java b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JExternallyRolledFileAppender.java
deleted file mode 100644
index e07c600..0000000
--- a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JExternallyRolledFileAppender.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.IOException;
-import org.apache.ignite.internal.util.typedef.internal.A;
-import org.apache.ignite.lang.IgniteClosure;
-import org.apache.log4j.varia.ExternallyRolledFileAppender;
-
-/**
- * Log4J {@link ExternallyRolledFileAppender} with added support for grid node IDs.
- */
-public class Log4JExternallyRolledFileAppender extends ExternallyRolledFileAppender implements Log4jFileAware {
-    /** Basic log file name. */
-    private String baseFileName;
-
-    /**
-     * Default constructor (does not do anything).
-     */
-    public Log4JExternallyRolledFileAppender() {
-        init();
-    }
-
-    /**
-     *
-     */
-    private void init() {
-        Log4JLogger.addAppender(this);
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized void updateFilePath(IgniteClosure<String, String> filePathClos) {
-        A.notNull(filePathClos, "filePathClos");
-
-        if (baseFileName == null)
-            baseFileName = fileName;
-
-        fileName = filePathClos.apply(baseFileName);
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized void setFile(String fileName, boolean fileAppend, boolean bufIO, int bufSize)
-        throws IOException {
-        if (baseFileName != null)
-            super.setFile(fileName, fileAppend, bufIO, bufSize);
-    }
-}
diff --git a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JFileAppender.java b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JFileAppender.java
deleted file mode 100644
index 03188cd..0000000
--- a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JFileAppender.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.IOException;
-import org.apache.ignite.internal.util.typedef.internal.A;
-import org.apache.ignite.lang.IgniteClosure;
-import org.apache.log4j.FileAppender;
-import org.apache.log4j.Layout;
-
-/**
- * Log4J {@link FileAppender} with added support for grid node IDs.
- */
-public class Log4JFileAppender extends FileAppender implements Log4jFileAware {
-    /** Basic log file name. */
-    private String baseFileName;
-
-    /**
-     * Default constructor (does not do anything).
-     */
-    public Log4JFileAppender() {
-        init();
-    }
-
-    /**
-     * Instantiate a FileAppender with given parameters.
-     *
-     * @param layout Layout.
-     * @param filename File name.
-     * @throws IOException If failed.
-     */
-    public Log4JFileAppender(Layout layout, String filename) throws IOException {
-        super(layout, filename);
-
-        init();
-    }
-
-    /**
-     * Instantiate a FileAppender with given parameters.
-     *
-     * @param layout Layout.
-     * @param filename File name.
-     * @param append Append flag.
-     * @throws IOException If failed.
-     */
-    public Log4JFileAppender(Layout layout, String filename, boolean append) throws IOException {
-        super(layout, filename, append);
-
-        init();
-    }
-
-    /**
-     * Instantiate a FileAppender with given parameters.
-     *
-     * @param layout Layout.
-     * @param filename File name.
-     * @param append Append flag.
-     * @param bufIO Buffered IO flag.
-     * @param bufSize Buffer size.
-     * @throws IOException If failed.
-     */
-    public Log4JFileAppender(Layout layout, String filename, boolean append, boolean bufIO, int bufSize)
-        throws IOException {
-        super(layout, filename, append, bufIO, bufSize);
-
-        init();
-    }
-
-    /**
-     *
-     */
-    private void init() {
-        Log4JLogger.addAppender(this);
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized void setFile(String fileName, boolean fileAppend, boolean bufIO, int bufSize)
-        throws IOException {
-        if (baseFileName != null)
-            super.setFile(fileName, fileAppend, bufIO, bufSize);
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized void updateFilePath(IgniteClosure<String, String> filePathClos) {
-        A.notNull(filePathClos, "filePathClos");
-
-        if (baseFileName == null)
-            baseFileName = fileName;
-
-        fileName = filePathClos.apply(baseFileName);
-    }
-}
diff --git a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
deleted file mode 100644
index 7d31160..0000000
--- a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4JLogger.java
+++ /dev/null
@@ -1,659 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.UUID;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.internal.util.GridConcurrentHashSet;
-import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.typedef.C1;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.A;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteClosure;
-import org.apache.ignite.logger.LoggerNodeIdAndApplicationAware;
-import org.apache.log4j.Appender;
-import org.apache.log4j.Category;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.FileAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.helpers.FileWatchdog;
-import org.apache.log4j.varia.LevelRangeFilter;
-import org.apache.log4j.xml.DOMConfigurator;
-import org.jetbrains.annotations.Nullable;
-
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_CONSOLE_APPENDER;
-import static org.apache.ignite.IgniteSystemProperties.IGNITE_QUIET;
-
-/**
- * Log4j-based implementation for logging. This logger should be used
- * by loaders that have prefer <a target=_new href="http://logging.apache.org/log4j/1.2/">log4j</a>-based logging.
- * <p>
- * Here is a typical example of configuring log4j logger in Ignite configuration file:
- * <pre name="code" class="xml">
- *      &lt;property name="gridLogger"&gt;
- *          &lt;bean class="org.apache.ignite.logger.log4j.Log4JLogger"&gt;
- *              &lt;constructor-arg type="java.lang.String" value="config/ignite-log4j.xml"/&gt;
- *          &lt;/bean>
- *      &lt;/property&gt;
- * </pre>
- * and from your code:
- * <pre name="code" class="java">
- *      IgniteConfiguration cfg = new IgniteConfiguration();
- *      ...
- *      URL xml = U.resolveIgniteUrl("config/custom-log4j.xml");
- *      IgniteLogger log = new Log4JLogger(xml);
- *      ...
- *      cfg.setGridLogger(log);
- * </pre>
- *
- * Please take a look at <a target=_new href="http://logging.apache.org/log4j/1.2/index.html">Apache Log4j 1.2</a>
- * for additional information.
- * <p>
- * It's recommended to use Ignite logger injection instead of using/instantiating
- * logger in your task/job code. See {@link org.apache.ignite.resources.LoggerResource} annotation about logger
- * injection.
- *
- * @deprecated Log4j 1.x had reached end of life and contains critical vulnerabilities. See
- * <a href="https://blogs.apache.org/foundation/entry/apache_logging_services_project_announces">the announcement</a>.
- * Please, be aware this module will be removed in the next releases.
- * Use <a href="https://ignite.apache.org/docs/latest/logging#using-log4j2">ignite-log4j2</a> module instead.
- */
-@Deprecated
-public class Log4JLogger implements IgniteLogger, LoggerNodeIdAndApplicationAware, Log4jFileAware {
-    /** */
-    public static final String DEPRECATED_MSG = "The 'ignite-log4j' module is deprecated and will be removed in the " +
-        "next releases. Use 'ignite-log4j2' module instead.";
-
-    /** Appenders. */
-    private static Collection<FileAppender> fileAppenders = new GridConcurrentHashSet<>();
-
-    /** */
-    private static volatile boolean inited;
-
-    /** */
-    private static volatile boolean quiet0;
-
-    /** */
-    private static final Object mux = new Object();
-
-    /** Logger implementation. */
-    @GridToStringExclude
-    @SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized")
-    private Logger impl;
-
-    /** Path to configuration file. */
-    @GridToStringExclude
-    private final String cfg;
-
-    /** Quiet flag. */
-    private final boolean quiet;
-
-    /** Node ID. */
-    @GridToStringExclude
-    private UUID nodeId;
-
-    /**
-     * Creates new logger and automatically detects if root logger already
-     * has appenders configured. If it does not, the root logger will be
-     * configured with default appender (analogous to calling
-     * {@link #Log4JLogger(boolean) Log4JLogger(boolean)}
-     * with parameter {@code true}, otherwise, existing appenders will be used (analogous
-     * to calling {@link #Log4JLogger(boolean) Log4JLogger(boolean)}
-     * with parameter {@code false}).
-     */
-    public Log4JLogger() {
-        this(!isConfigured());
-    }
-
-    /**
-     * Creates new logger. If initialize parameter is {@code true} the Log4j
-     * logger will be initialized with default console appender and {@code INFO}
-     * log level.
-     *
-     * @param init If {@code true}, then a default console appender with
-     *      following pattern layout will be created: {@code %d{ISO8601} %-5p [%c{1}] %m%n}.
-     *      If {@code false}, then no implicit initialization will take place,
-     *      and {@code Log4j} should be configured prior to calling this
-     *      constructor.
-     */
-    public Log4JLogger(boolean init) {
-        impl = Logger.getRootLogger();
-
-        if (init) {
-            // Implementation has already been inited, passing NULL.
-            addConsoleAppenderIfNeeded(Level.INFO, null);
-
-            quiet = quiet0;
-        }
-        else
-            quiet = true;
-
-        cfg = null;
-
-        warning(DEPRECATED_MSG);
-    }
-
-    /**
-     * Creates new logger with given implementation.
-     *
-     * @param impl Log4j implementation to use.
-     */
-    public Log4JLogger(final Logger impl) {
-        assert impl != null;
-
-        addConsoleAppenderIfNeeded(null, new C1<Boolean, Logger>() {
-            @Override public Logger apply(Boolean init) {
-                return impl;
-            }
-        });
-
-        quiet = quiet0;
-        cfg = null;
-
-        warning(DEPRECATED_MSG);
-    }
-
-    /**
-     * Creates new logger with given implementation.
-     *
-     * @param impl Log4j implementation to use.
-     * @param path Configuration file/url path.
-     */
-    private Log4JLogger(final Logger impl, final String path) {
-        assert impl != null;
-
-        addConsoleAppenderIfNeeded(null, new C1<Boolean, Logger>() {
-            @Override public Logger apply(Boolean init) {
-                return impl;
-            }
-        });
-
-        quiet = quiet0;
-        cfg = path;
-    }
-
-    /**
-     * Creates new logger with given configuration {@code path}.
-     * Calling this constructor is equivalent to calling {@code Log4JLogger(path, FileWatchdog.DEFAULT_DELAY}.
-     *
-     * @param path Path to log4j configuration XML file.
-     * @throws IgniteCheckedException Thrown in case logger can't be created.
-     */
-    public Log4JLogger(final String path) throws IgniteCheckedException {
-        this(path, FileWatchdog.DEFAULT_DELAY);
-    }
-
-    /**
-     * Creates new logger with given configuration {@code path}.
-     * <p>
-     * If {@code watchDelay} is not zero, created logger will check the configuration file for changes once every
-     * {@code watchDelay} milliseconds, and update its configuration if the file was changed.
-     * See {@link DOMConfigurator#configureAndWatch(String, long)} for details.
-     *
-     * @param path Path to log4j configuration XML file.
-     * @param watchDelay delay in milliseconds used to check configuration file for changes.
-     * @throws IgniteCheckedException Thrown in case logger can't be created.
-     */
-    public Log4JLogger(final String path, long watchDelay) throws IgniteCheckedException {
-        if (path == null)
-            throw new IgniteCheckedException("Configuration XML file for Log4j must be specified.");
-
-        if (watchDelay < 0)
-            throw new IgniteCheckedException("watchDelay can't be negative: " + watchDelay);
-
-        this.cfg = path;
-
-        final File cfgFile = U.resolveIgnitePath(path);
-
-        if (cfgFile == null)
-            throw new IgniteCheckedException("Log4j configuration path was not found: " + path);
-
-        addConsoleAppenderIfNeeded(null, new C1<Boolean, Logger>() {
-            @Override public Logger apply(Boolean init) {
-                if (init) {
-                    if (watchDelay > 0)
-                        DOMConfigurator.configureAndWatch(cfgFile.getPath(), watchDelay);
-                    else
-                        DOMConfigurator.configure(cfgFile.getPath());
-                }
-
-                return Logger.getRootLogger();
-            }
-        });
-
-        quiet = quiet0;
-
-        warning(DEPRECATED_MSG);
-    }
-
-    /**
-     * Creates new logger with given configuration {@code cfgFile}.
-     * Calling this constructor is equivalent to calling {@code Log4JLogger(cfgFile, FileWatchdog.DEFAULT_DELAY}.
-     *
-     * @param cfgFile Log4j configuration XML file.
-     * @throws IgniteCheckedException Thrown in case logger can't be created.
-     */
-    public Log4JLogger(File cfgFile) throws IgniteCheckedException {
-        this(cfgFile, FileWatchdog.DEFAULT_DELAY);
-    }
-
-    /**
-     * Creates new logger with given configuration {@code cfgFile}.
-     * <p>
-     * If {@code watchDelay} is not zero, created logger will check the configuration file for changes once every
-     * {@code watchDelay} milliseconds, and update its configuration if the file was changed.
-     * See {@link DOMConfigurator#configureAndWatch(String, long)} for details.
-     *
-     * @param cfgFile Log4j configuration XML file.
-     * @param watchDelay delay in milliseconds used to check configuration file for changes.
-     * @throws IgniteCheckedException Thrown in case logger can't be created.
-     */
-    public Log4JLogger(final File cfgFile, final long watchDelay) throws IgniteCheckedException {
-        if (cfgFile == null)
-            throw new IgniteCheckedException("Configuration XML file for Log4j must be specified.");
-
-        if (!cfgFile.exists() || cfgFile.isDirectory())
-            throw new IgniteCheckedException("Log4j configuration path was not found or is a directory: " + cfgFile);
-
-        if (watchDelay < 0)
-            throw new IgniteCheckedException("watchDelay can't be negative: " + watchDelay);
-
-        cfg = cfgFile.getAbsolutePath();
-
-        addConsoleAppenderIfNeeded(null, new C1<Boolean, Logger>() {
-            @Override public Logger apply(Boolean init) {
-                if (init) {
-                    if (watchDelay > 0)
-                        DOMConfigurator.configureAndWatch(cfgFile.getPath(), watchDelay);
-                    else
-                        DOMConfigurator.configure(cfgFile.getPath());
-                }
-
-                return Logger.getRootLogger();
-            }
-        });
-
-        quiet = quiet0;
-
-        warning(DEPRECATED_MSG);
-    }
-
-    /**
-     * Creates new logger with given configuration {@code cfgUrl}.
-     * Calling this constructor is equivalent to calling {@code Log4JLogger(cfgUrl, FileWatchdog.DEFAULT_DELAY}.
-     *
-     * @param cfgUrl URL for Log4j configuration XML file.
-     * @throws IgniteCheckedException Thrown in case logger can't be created.
-     */
-    public Log4JLogger(final URL cfgUrl) throws IgniteCheckedException {
-        this(cfgUrl, FileWatchdog.DEFAULT_DELAY);
-    }
-
-    /**
-     * Creates new logger with given configuration {@code cfgUrl}.
-     * <p>
-     * If {@code watchDelay} is not zero, created logger will check the configuration file for changes once every
-     * {@code watchDelay} milliseconds, and update its configuration if the file was changed.
-     * See {@link DOMConfigurator#configureAndWatch(String, long)} for details.
-     *
-     * @param cfgUrl URL for Log4j configuration XML file.
-     * @param watchDelay delay in milliseconds used to check configuration file for changes.
-     * @throws IgniteCheckedException Thrown in case logger can't be created.
-     */
-    public Log4JLogger(final URL cfgUrl, final long watchDelay) throws IgniteCheckedException {
-        if (cfgUrl == null)
-            throw new IgniteCheckedException("Configuration XML file for Log4j must be specified.");
-
-        if (watchDelay < 0)
-            throw new IgniteCheckedException("watchDelay can't be negative: " + watchDelay);
-
-        cfg = cfgUrl.getPath();
-
-        addConsoleAppenderIfNeeded(null, new C1<Boolean, Logger>() {
-            @Override public Logger apply(Boolean init) {
-                if (init) {
-                    if (watchDelay > 0)
-                        DOMConfigurator.configureAndWatch(cfg, watchDelay);
-                    else
-                        DOMConfigurator.configure(cfg);
-                }
-
-                return Logger.getRootLogger();
-            }
-        });
-
-        quiet = quiet0;
-
-        warning(DEPRECATED_MSG);
-    }
-
-    /**
-     * Checks if Log4j is already configured within this VM or not.
-     *
-     * @return {@code True} if log4j was already configured, {@code false} otherwise.
-     */
-    public static boolean isConfigured() {
-        return Logger.getRootLogger().getAllAppenders().hasMoreElements();
-    }
-
-    /**
-     * Sets level for internal log4j implementation.
-     *
-     * @param level Log level to set.
-     */
-    public void setLevel(Level level) {
-        impl.setLevel(level);
-    }
-
-    /** {@inheritDoc} */
-    @Nullable @Override public String fileName() {
-        FileAppender fapp = F.first(fileAppenders);
-
-        return fapp != null ? fapp.getFile() : null;
-    }
-
-    /**
-     * Adds console appender when needed with some default logging settings.
-     *
-     * @param logLevel Optional log level.
-     * @param implInitC Optional log implementation init closure.
-     */
-    private void addConsoleAppenderIfNeeded(@Nullable Level logLevel,
-        @Nullable IgniteClosure<Boolean, Logger> implInitC) {
-        if (inited) {
-            if (implInitC != null)
-                // Do not init.
-                impl = implInitC.apply(false);
-
-            return;
-        }
-
-        synchronized (mux) {
-            if (inited) {
-                if (implInitC != null)
-                    // Do not init.
-                    impl = implInitC.apply(false);
-
-                return;
-            }
-
-            if (implInitC != null)
-                // Init logger impl.
-                impl = implInitC.apply(true);
-
-            boolean quiet = Boolean.valueOf(System.getProperty(IGNITE_QUIET, "true"));
-
-            boolean consoleAppenderFound = false;
-            Category rootCategory = null;
-            ConsoleAppender errAppender = null;
-
-            for (Category l = impl; l != null; ) {
-                if (!consoleAppenderFound) {
-                    for (Enumeration appenders = l.getAllAppenders(); appenders.hasMoreElements(); ) {
-                        Appender appender = (Appender)appenders.nextElement();
-
-                        if (appender instanceof ConsoleAppender) {
-                            if ("CONSOLE_ERR".equals(appender.getName())) {
-                                // Treat CONSOLE_ERR appender as a system one and don't count it.
-                                errAppender = (ConsoleAppender)appender;
-
-                                continue;
-                            }
-
-                            consoleAppenderFound = true;
-
-                            break;
-                        }
-                    }
-                }
-
-                if (l.getParent() == null) {
-                    rootCategory = l;
-
-                    break;
-                }
-                else
-                    l = l.getParent();
-            }
-
-            if (consoleAppenderFound && quiet)
-                // User configured console appender, but log is quiet.
-                quiet = false;
-
-            if (!consoleAppenderFound && !quiet && Boolean.valueOf(System.getProperty(IGNITE_CONSOLE_APPENDER, "true"))) {
-                // Console appender not found => we've looked through all categories up to root.
-                assert rootCategory != null;
-
-                // User launched ignite in verbose mode and did not add console appender with INFO level
-                // to configuration and did not set IGNITE_CONSOLE_APPENDER to false.
-                if (errAppender != null) {
-                    rootCategory.addAppender(createConsoleAppender(Level.INFO));
-
-                    if (errAppender.getThreshold() == Level.ERROR)
-                        errAppender.setThreshold(Level.WARN);
-                }
-                else
-                    // No error console appender => create console appender with no level limit.
-                    rootCategory.addAppender(createConsoleAppender(Level.OFF));
-
-                if (logLevel != null)
-                    impl.setLevel(logLevel);
-            }
-
-            // If still don't have appenders, disable logging.
-            if (!isConfigured())
-                impl.setLevel(Level.OFF);
-
-            quiet0 = quiet;
-            inited = true;
-        }
-    }
-
-    /**
-     * Creates console appender with some reasonable default logging settings.
-     *
-     * @param maxLevel Max logging level.
-     * @return New console appender.
-     */
-    private Appender createConsoleAppender(Level maxLevel) {
-        String fmt = "[%d{ISO8601}][%-5p][%t][%c{1}] %m%n";
-
-        // Configure output that should go to System.out
-        Appender app = new ConsoleAppender(new PatternLayout(fmt), ConsoleAppender.SYSTEM_OUT);
-
-        LevelRangeFilter lvlFilter = new LevelRangeFilter();
-
-        lvlFilter.setLevelMin(Level.TRACE);
-        lvlFilter.setLevelMax(maxLevel);
-
-        app.addFilter(lvlFilter);
-
-        return app;
-    }
-
-    /**
-     * Adds file appender.
-     *
-     * @param a Appender.
-     */
-    public static void addAppender(FileAppender a) {
-        A.notNull(a, "a");
-
-        fileAppenders.add(a);
-    }
-
-    /**
-     * Removes file appender.
-     *
-     * @param a Appender.
-     */
-    public static void removeAppender(FileAppender a) {
-        A.notNull(a, "a");
-
-        fileAppenders.remove(a);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void setApplicationAndNode(@Nullable String application, UUID nodeId) {
-        A.notNull(nodeId, "nodeId");
-
-        this.nodeId = nodeId;
-
-        updateFilePath(new Log4jNodeIdFilePath(application, nodeId));
-    }
-
-    /** {@inheritDoc} */
-    @Override public UUID getNodeId() {
-        return nodeId;
-    }
-
-    /**
-     * Gets files for all registered file appenders.
-     *
-     * @return List of files.
-     */
-    public static Collection<String> logFiles() {
-        Collection<String> res = new ArrayList<>(fileAppenders.size());
-
-        for (FileAppender a : fileAppenders)
-            res.add(a.getFile());
-
-        return res;
-    }
-
-    /**
-     * Gets {@link org.apache.ignite.IgniteLogger} wrapper around log4j logger for the given
-     * category. If category is {@code null}, then root logger is returned. If
-     * category is an instance of {@link Class} then {@code (Class)ctgr).getName()}
-     * is used as category name.
-     *
-     * @param ctgr {@inheritDoc}
-     * @return {@link org.apache.ignite.IgniteLogger} wrapper around log4j logger.
-     */
-    @Override public Log4JLogger getLogger(Object ctgr) {
-        return new Log4JLogger(ctgr == null ? Logger.getRootLogger() :
-            ctgr instanceof Class ? Logger.getLogger(((Class<?>)ctgr).getName()) :
-                Logger.getLogger(ctgr.toString()), cfg);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void trace(String msg) {
-        if (!impl.isTraceEnabled())
-            warning("Logging at TRACE level without checking if TRACE level is enabled: " + msg);
-
-        impl.trace(msg);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void debug(String msg) {
-        if (!impl.isDebugEnabled())
-            warning("Logging at DEBUG level without checking if DEBUG level is enabled: " + msg);
-
-        impl.debug(msg);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void info(String msg) {
-        if (!impl.isInfoEnabled())
-            warning("Logging at INFO level without checking if INFO level is enabled: " + msg);
-
-        impl.info(msg);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void warning(String msg) {
-        impl.warn(msg);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void warning(String msg, @Nullable Throwable e) {
-        impl.warn(msg, e);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void error(String msg) {
-        impl.error(msg);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void error(String msg, @Nullable Throwable e) {
-        impl.error(msg, e);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isTraceEnabled() {
-        return impl.isTraceEnabled();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isDebugEnabled() {
-        return impl.isDebugEnabled();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isInfoEnabled() {
-        return impl.isInfoEnabled();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean isQuiet() {
-        return quiet;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(Log4JLogger.class, this, "config", this.cfg);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void updateFilePath(IgniteClosure<String, String> filePathClos) {
-        A.notNull(filePathClos, "filePathClos");
-
-        for (FileAppender a : fileAppenders) {
-            if (a instanceof Log4jFileAware) {
-                ((Log4jFileAware)a).updateFilePath(filePathClos);
-
-                a.activateOptions();
-            }
-        }
-    }
-
-    /**
-     * Cleans up the logger configuration. Should be used in unit tests only for sequential tests run with
-     * different configurations
-     */
-    static void cleanup() {
-        synchronized (mux) {
-            if (inited)
-                LogManager.shutdown();
-
-            inited = false;
-        }
-    }
-}
diff --git a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4jFileAware.java b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4jFileAware.java
deleted file mode 100644
index b2ba9b6..0000000
--- a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4jFileAware.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import org.apache.ignite.lang.IgniteClosure;
-
-/**
- * Interface for those loggers and appenders that evaluate their file paths lazily.
- */
-interface Log4jFileAware {
-    /**
-     * Sets closure that later evaluate file path.
-     *
-     * @param filePathClos Closure that generates actual file path.
-     */
-    void updateFilePath(IgniteClosure<String, String> filePathClos);
-}
diff --git a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4jNodeIdFilePath.java b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4jNodeIdFilePath.java
deleted file mode 100644
index 715684d..0000000
--- a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4jNodeIdFilePath.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.File;
-import java.util.UUID;
-import org.apache.ignite.IgniteSystemProperties;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteClosure;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Closure that generates file path adding node id to filename as a suffix.
- */
-class Log4jNodeIdFilePath implements IgniteClosure<String, String> {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Applictaion name. */
-    private final @Nullable String app;
-
-    /** Node id. */
-    private final UUID nodeId;
-
-    /**
-     * Creates new instance.
-     *
-     * @param app Application name.
-     * @param id Node id.
-     */
-    Log4jNodeIdFilePath(@Nullable String app, UUID id) {
-        this.app = app;
-        nodeId = id;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String apply(String oldPath) {
-        String fileName = (app != null ? app : "ignite") + ".log";
-
-        if (!F.isEmpty(U.IGNITE_LOG_DIR))
-            return U.nodeIdLogFileName(nodeId, new File(U.IGNITE_LOG_DIR, fileName).getAbsolutePath());
-
-        if (oldPath != null) // fileName could be null if IGNITE_HOME is not defined.
-            return U.nodeIdLogFileName(nodeId, oldPath);
-
-        String tmpDir = IgniteSystemProperties.getString("java.io.tmpdir");
-
-        if (tmpDir != null)
-            return U.nodeIdLogFileName(nodeId, new File(tmpDir, fileName).getAbsolutePath());
-
-        System.err.println("Failed to get tmp directory for log file.");
-
-        return null;
-    }
-}
diff --git a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4jRollingFileAppender.java b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4jRollingFileAppender.java
deleted file mode 100644
index 8181f3e..0000000
--- a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/Log4jRollingFileAppender.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.IOException;
-import org.apache.ignite.internal.util.typedef.internal.A;
-import org.apache.ignite.lang.IgniteClosure;
-import org.apache.log4j.Layout;
-import org.apache.log4j.RollingFileAppender;
-
-/**
- * Log4J {@link RollingFileAppender} with added support for grid node IDs.
- */
-public class Log4jRollingFileAppender extends RollingFileAppender implements Log4jFileAware {
-    /** Basic log file name. */
-    private String baseFileName;
-
-    /**
-     * Default constructor (does not do anything).
-     */
-    public Log4jRollingFileAppender() {
-        init();
-    }
-
-    /**
-     * Instantiate a FileAppender with given parameters.
-     *
-     * @param layout Layout.
-     * @param filename File name.
-     * @throws IOException If failed.
-     */
-    public Log4jRollingFileAppender(Layout layout, String filename) throws IOException {
-        super(layout, filename);
-
-        init();
-    }
-
-    /**
-     * Instantiate a FileAppender with given parameters.
-     *
-     * @param layout Layout.
-     * @param filename File name.
-     * @param append Append flag.
-     * @throws IOException If failed.
-     */
-    public Log4jRollingFileAppender(Layout layout, String filename, boolean append) throws IOException {
-        super(layout, filename, append);
-
-        init();
-    }
-
-    /**
-     * Initializes appender.
-     */
-    private void init() {
-        Log4JLogger.addAppender(this);
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized void updateFilePath(IgniteClosure<String, String> filePathClos) {
-        A.notNull(filePathClos, "filePathClos");
-
-        if (baseFileName == null)
-            baseFileName = fileName;
-
-        fileName = filePathClos.apply(baseFileName);
-    }
-
-    /** {@inheritDoc} */
-    @Override public synchronized void setFile(String fileName, boolean fileAppend, boolean bufIO, int bufSize)
-        throws IOException {
-        if (baseFileName != null)
-            super.setFile(fileName, fileAppend, bufIO, bufSize);
-    }
-}
diff --git a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/package-info.java b/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/package-info.java
deleted file mode 100644
index e38386f..0000000
--- a/modules/log4j/src/main/java/org/apache/ignite/logger/log4j/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * <!-- Package description. -->
- * Contains <b>default</b> Log4j implementation for logging.
- */
-
-package org.apache.ignite.logger.log4j;
diff --git a/modules/log4j/src/test/config/log4j-debug.xml b/modules/log4j/src/test/config/log4j-debug.xml
deleted file mode 100644
index 2c36194..0000000
--- a/modules/log4j/src/test/config/log4j-debug.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN"
-    "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-        <param name="Target" value="System.out"/>
-
-        <param name="Threshold" value="DEBUG"/>
-
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%p] %m%n"/>
-        </layout>
-    </appender>
-
-    <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
-        <param name="File" value="${IGNITE_HOME}/work/log/GridLog4jConfigUpdateTest.log"/>
-        <param name="Append" value="true"/>
-        <param name="MaxFileSize" value="10MB"/>
-        <param name="MaxBackupIndex" value="10"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%p] %m%n"/>
-        </layout>
-    </appender>
-
-    <root>
-        <level value="DEBUG"/>
-
-        <appender-ref ref="CONSOLE"/>
-        <appender-ref ref="FILE"/>
-    </root>
-</log4j:configuration>
diff --git a/modules/log4j/src/test/config/log4j-info.xml b/modules/log4j/src/test/config/log4j-info.xml
deleted file mode 100644
index 6e6d145..0000000
--- a/modules/log4j/src/test/config/log4j-info.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN"
-    "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-        <param name="Target" value="System.out"/>
-
-        <param name="Threshold" value="DEBUG"/>
-
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%p] %m%n"/>
-        </layout>
-    </appender>
-
-    <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
-        <param name="File" value="${IGNITE_HOME}/work/log/GridLog4jConfigUpdateTest.log"/>
-        <param name="Append" value="true"/>
-        <param name="MaxFileSize" value="10MB"/>
-        <param name="MaxBackupIndex" value="10"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%p] %m%n"/>
-        </layout>
-    </appender>
-
-    <root>
-        <level value="INFO"/>
-
-        <appender-ref ref="CONSOLE"/>
-        <appender-ref ref="FILE"/>
-    </root>
-</log4j:configuration>
diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java
deleted file mode 100644
index 64e09a9..0000000
--- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jConfigUpdateTest.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.File;
-import java.nio.file.Files;
-import java.nio.file.StandardCopyOption;
-import java.util.Date;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.log4j.helpers.FileWatchdog;
-import org.junit.Test;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-/**
- * Checking that Log4j configuration is updated when its source file is changed.
- */
-public class GridLog4jConfigUpdateTest {
-    /** Path to log4j configuration with INFO enabled. */
-    private static final String LOG_CONFIG_INFO = "modules/log4j/src/test/config/log4j-info.xml";
-
-    /** Path to log4j configuration with DEBUG enabled. */
-    private static final String LOG_CONFIG_DEBUG = "modules/log4j/src/test/config/log4j-debug.xml";
-
-    /** Path to log4j configuration with DEBUG enabled. */
-    private static final String LOG_CONFIG_MAIN = "work/log/log4j-GridLog4jConfigUpdateTest.xml";
-
-    /** Path to log file. */
-    private static final String LOG_DEST = "work/log/GridLog4jConfigUpdateTest.log";
-
-    /**
-     * Time to wait before updating the configuration file.
-     * Should be large enough to be recorded on different file systems.
-     */
-    private static final int DELAY_BEFORE_MODIFICATION = 5000;
-
-    /**
-     * Check that changing log4j config file causes the logger configuration to be updated.
-     * String-accepting constructor is used.
-     */
-    @Test
-    public void testConfigChangeStringConstructor() throws Exception {
-        checkConfigUpdate(new Log4JLoggerSupplier() {
-            @Override public Log4JLogger get(File cfgFile) throws Exception {
-                return new Log4JLogger(cfgFile.getPath(), 10);
-            }
-        }, 5000); // use larger delay to avoid relying on exact timing
-    }
-
-    /**
-     * Check that changing log4j config file causes the logger configuration to be updated.
-     * String-accepting constructor is used.
-     */
-    @Test
-    public void testConfigChangeStringConstructorDefaultDelay() throws Exception {
-        checkConfigUpdate(new Log4JLoggerSupplier() {
-            @Override public Log4JLogger get(File cfgFile) throws Exception {
-                return new Log4JLogger(cfgFile.getPath());
-            }
-        }, FileWatchdog.DEFAULT_DELAY + 5000); // use larger delay to avoid relying on exact timing
-    }
-
-    /**
-     * Check that changing log4j config file causes the logger configuration to be updated.
-     * File-accepting constructor is used.
-     */
-    @Test
-    public void testConfigChangeFileConstructor() throws Exception {
-        checkConfigUpdate(new Log4JLoggerSupplier() {
-            @Override public Log4JLogger get(File cfgFile) throws Exception {
-                return new Log4JLogger(cfgFile, 10);
-            }
-        }, 5000); // use larger delay to avoid relying on exact timing
-    }
-
-    /**
-     * Check that changing log4j config file causes the logger configuration to be updated.
-     * File-accepting constructor is used.
-     */
-    @Test
-    public void testConfigChangeUrlConstructor() throws Exception {
-        checkConfigUpdate(new Log4JLoggerSupplier() {
-            @Override public Log4JLogger get(File cfgFile) throws Exception {
-                return new Log4JLogger(cfgFile.toURI().toURL(), 10);
-            }
-        }, 5000); // use larger delay to avoid relying on exact timing
-    }
-
-    /**
-     * Checks that Log4JLogger is updated after configuration file is changed.
-     *
-     * @param logSupplier Function returning a logger instance to be tested.
-     * @param delay time to wait after configuration file has been changed.
-     */
-    @SuppressWarnings("ResultOfMethodCallIgnored")
-    private void checkConfigUpdate(Log4JLoggerSupplier logSupplier, long delay) throws Exception {
-        Log4JLogger.cleanup();
-
-        File infoCfgFile = new File(U.getIgniteHome(), LOG_CONFIG_INFO);
-        File debugCfgFile = new File(U.getIgniteHome(), LOG_CONFIG_DEBUG);
-        File mainCfgFile = new File(U.getIgniteHome(), LOG_CONFIG_MAIN);
-        File logFile = new File(U.getIgniteHome(), LOG_DEST);
-
-        System.out.println("INFO config: " + infoCfgFile);
-        System.out.println("DEBUG config: " + debugCfgFile);
-        System.out.println("Main config: " + mainCfgFile);
-        System.out.println("Log file: " + logFile);
-
-        if (logFile.delete())
-            System.out.println("Old log file was deleted.");
-
-        // Install INFO config.
-        mainCfgFile.getParentFile().mkdirs();
-        Files.copy(infoCfgFile.toPath(), mainCfgFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
-        mainCfgFile.setLastModified(new Date().getTime());
-
-        Log4JLogger log = logSupplier.get(mainCfgFile);
-
-        log.info("Accepted info");
-        log.debug("Ignored debug");
-
-        // Wait a bit before copying the file so that new modification date is guaranteed to be different.
-        Thread.sleep(DELAY_BEFORE_MODIFICATION);
-
-        // Replace current config with DEBUG config.
-        Files.copy(debugCfgFile.toPath(), mainCfgFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
-        mainCfgFile.setLastModified(new Date().getTime());
-
-        // Wait for the update to happen.
-        Thread.sleep(delay);
-
-        log.debug("Accepted debug");
-
-        String logContent = U.readFileToString(logFile.getPath(), "UTF-8");
-
-        assertTrue(logContent.contains("[INFO] Accepted info"));
-        assertFalse(logContent.contains("[DEBUG] Ignored debug"));
-        assertTrue(logContent.contains("[DEBUG] Accepted debug"));
-
-        mainCfgFile.delete();
-        Log4JLogger.cleanup();
-    }
-
-    /** Creates Log4JLogger instance for testing. */
-    private interface Log4JLoggerSupplier {
-        /** Creates Log4JLogger instance for testing. */
-        Log4JLogger get(File cfgFile) throws Exception;
-    }
-
-}
diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java
deleted file mode 100644
index f166c00..0000000
--- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jCorrectFileNameTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.Enumeration;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.G;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
-import org.apache.ignite.testframework.junits.common.GridCommonTest;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-import org.apache.log4j.varia.LevelRangeFilter;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-/**
- * Tests that several grids log to files with correct names.
- */
-@GridCommonTest(group = "Logger")
-public class GridLog4jCorrectFileNameTest {
-    /** Appender */
-    private Log4jRollingFileAppender appender;
-
-    /** */
-    @Before
-    public void setUp() {
-        Logger root = Logger.getRootLogger();
-
-        for (Enumeration appenders = root.getAllAppenders(); appenders.hasMoreElements(); ) {
-            if (appenders.nextElement() instanceof Log4jRollingFileAppender)
-                return;
-        }
-
-        appender = createAppender();
-
-        root.addAppender(appender);
-    }
-
-    /** */
-    @After
-    public void tearDown() {
-        if (appender != null) {
-            Logger.getRootLogger().removeAppender(Log4jRollingFileAppender.class.getSimpleName());
-
-            Log4JLogger.removeAppender(appender);
-        }
-    }
-
-    /**
-     * Tests correct behaviour in case 2 local nodes are started.
-     *
-     * @throws Exception If error occurs.
-     */
-    @Test
-    public void testLogFilesTwoNodes() throws Exception {
-        checkOneNode(0);
-        checkOneNode(1);
-    }
-
-    /**
-     * Starts the local node and checks for presence of log file.
-     * Also checks that this is really a log of a started node.
-     *
-     * @param id Test-local node ID.
-     * @throws Exception If error occurred.
-     */
-    private void checkOneNode(int id) throws Exception {
-        try (Ignite ignite = G.start(getConfiguration("grid" + id))) {
-            String id8 = U.id8(ignite.cluster().localNode().id());
-            String logPath = "work/log/ignite-" + id8 + ".log";
-            File logFile = U.resolveIgnitePath(logPath);
-
-            assertNotNull("Failed to resolve path: " + logPath, logFile);
-            assertTrue("Log file does not exist: " + logFile, logFile.exists());
-
-            String logContent = U.readFileToString(logFile.getAbsolutePath(), "UTF-8");
-
-            assertTrue("Log file does not contain it's node ID: " + logFile,
-                logContent.contains(">>> Local node [ID=" + id8.toUpperCase()));
-        }
-    }
-
-    /**
-     * Creates grid configuration.
-     *
-     * @param igniteInstanceName Ignite instance name.
-     * @return Grid configuration.
-     */
-    private static IgniteConfiguration getConfiguration(String igniteInstanceName) {
-        IgniteConfiguration cfg = new IgniteConfiguration();
-
-        cfg.setIgniteInstanceName(igniteInstanceName);
-        cfg.setGridLogger(new Log4JLogger());
-        cfg.setConnectorConfiguration(null);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder(false);
-
-        ipFinder.setAddresses(Collections.singleton("127.0.0.1:47500..47502"));
-
-        disco.setIpFinder(ipFinder);
-
-        cfg.setDiscoverySpi(disco);
-
-        return cfg;
-    }
-
-    /**
-     * Creates new GridLog4jRollingFileAppender.
-     *
-     * @return GridLog4jRollingFileAppender.
-     */
-    private static Log4jRollingFileAppender createAppender() {
-        Log4jRollingFileAppender appender = new Log4jRollingFileAppender();
-
-        appender.setLayout(new PatternLayout("[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"));
-        appender.setFile("work/log/ignite.log");
-        appender.setName(Log4jRollingFileAppender.class.getSimpleName());
-
-        LevelRangeFilter lvlFilter = new LevelRangeFilter();
-
-        lvlFilter.setLevelMin(Level.DEBUG);
-        lvlFilter.setLevelMax(Level.INFO);
-
-        appender.addFilter(lvlFilter);
-
-        return appender;
-    }
-}
diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java
deleted file mode 100644
index 5b138b0..0000000
--- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jInitializedTest.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.testframework.junits.common.GridCommonTest;
-import org.apache.log4j.BasicConfigurator;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-
-/**
- * Log4j initialized test.
- */
-@GridCommonTest(group = "Logger")
-public class GridLog4jInitializedTest {
-    /** */
-    @Before
-    public void setUp() {
-        BasicConfigurator.configure();
-    }
-
-    /** */
-    @Test
-    public void testLogInitialize() {
-        IgniteLogger log = new Log4JLogger();
-
-        System.out.println(log.toString());
-
-        assertTrue(log.toString().contains("Log4JLogger"));
-        assertTrue(log.toString().contains("config=null"));
-
-        assertTrue(log.isInfoEnabled());
-
-        if (log.isDebugEnabled())
-            log.debug("This is 'debug' message.");
-
-        log.info("This is 'info' message.");
-        log.warning("This is 'warning' message.");
-        log.warning("This is 'warning' message.", new Exception("It's a test warning exception"));
-        log.error("This is 'error' message.");
-        log.error("This is 'error' message.", new Exception("It's a test error exception"));
-
-        assert log.getLogger(GridLog4jInitializedTest.class.getName()) instanceof Log4JLogger;
-    }
-}
diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java
deleted file mode 100644
index d609b11..0000000
--- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingFileTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.File;
-import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonTest;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-
-/**
- * Grid Log4j SPI test.
- */
-@GridCommonTest(group = "Logger")
-public class GridLog4jLoggingFileTest {
-    /** */
-    private IgniteLogger log;
-
-    /** Logger config */
-    private File xml;
-
-    /** */
-    @Before
-    public void setUp() throws Exception {
-        xml = GridTestUtils.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml");
-
-        assert xml != null;
-        assert xml.exists();
-
-        log = new Log4JLogger(xml).getLogger(getClass());
-    }
-
-    /**
-     * Tests log4j logging SPI.
-     */
-    @Test
-    public void testLog() {
-        System.out.println(log.toString());
-
-        assertTrue(log.toString().contains("Log4JLogger"));
-        assertTrue(log.toString().contains(xml.getPath()));
-
-        assertTrue(log.isInfoEnabled());
-
-        log.debug("This is 'debug' message.");
-        log.info("This is 'info' message.");
-        log.warning("This is 'warning' message.");
-        log.warning("This is 'warning' message.", new Exception("It's a test warning exception"));
-        log.error("This is 'error' message.");
-        log.error("This is 'error' message.", new Exception("It's a test error exception"));
-    }
-}
diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java
deleted file mode 100644
index b4840a4..0000000
--- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingPathTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.testframework.junits.common.GridCommonTest;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-
-/**
- * Grid Log4j SPI test.
- */
-@GridCommonTest(group = "Logger")
-public class GridLog4jLoggingPathTest {
-    /** */
-    private IgniteLogger log;
-
-    /** Logger config */
-    private String path = "modules/core/src/test/config/log4j-test.xml";
-
-    /** */
-    @Before
-    public void setUp() throws Exception {
-        log = new Log4JLogger(path).getLogger(getClass());
-    }
-
-    /**
-     * Tests log4j logging SPI.
-     */
-    @Test
-    public void testLog() {
-        System.out.println(log.toString());
-
-        assertTrue(log.toString().contains("Log4JLogger"));
-        assertTrue(log.toString().contains(path));
-
-        assertTrue(log.isInfoEnabled());
-
-        if (log.isDebugEnabled())
-            log.debug("This is 'debug' message.");
-
-        log.info("This is 'info' message.");
-        log.warning("This is 'warning' message.");
-        log.warning("This is 'warning' message.", new Exception("It's a test warning exception"));
-        log.error("This is 'error' message.");
-        log.error("This is 'error' message.", new Exception("It's a test error exception"));
-    }
-}
diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java
deleted file mode 100644
index e76625a..0000000
--- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jLoggingUrlTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.File;
-import java.net.URL;
-import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonTest;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-
-/**
- * Grid Log4j SPI test.
- */
-@GridCommonTest(group = "Logger")
-public class GridLog4jLoggingUrlTest {
-    /** */
-    private IgniteLogger log;
-
-    /** Logger config */
-    private URL url;
-
-    /** */
-    @Before
-    public void setUp() throws Exception {
-        File xml = GridTestUtils.resolveIgnitePath("modules/core/src/test/config/log4j-test.xml");
-
-        assert xml != null;
-        assert xml.exists();
-
-        url = xml.toURI().toURL();
-        log = new Log4JLogger(url).getLogger(getClass());
-    }
-
-    /**
-     * Tests log4j logging SPI.
-     */
-    @Test
-    public void testLog() {
-        System.out.println(log.toString());
-
-        assertTrue(log.toString().contains("Log4JLogger"));
-        assertTrue(log.toString().contains(url.getPath()));
-
-        assertTrue(log.isInfoEnabled());
-
-        log.debug("This is 'debug' message.");
-        log.info("This is 'info' message.");
-        log.warning("This is 'warning' message.");
-        log.warning("This is 'warning' message.", new Exception("It's a test warning exception"));
-        log.error("This is 'error' message.");
-        log.error("This is 'error' message.", new Exception("It's a test error exception"));
-    }
-}
diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java
deleted file mode 100644
index eefebbb..0000000
--- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jNotInitializedTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.testframework.junits.common.GridCommonTest;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-
-/**
- * Log4j not initialized test.
- */
-@GridCommonTest(group = "Logger")
-public class GridLog4jNotInitializedTest {
-    /** */
-    @Test
-    public void testLogInitialize() {
-        IgniteLogger log = new Log4JLogger().getLogger(GridLog4jNotInitializedTest.class);
-
-        System.out.println(log.toString());
-
-        assertTrue(log.toString().contains("Log4JLogger"));
-        assertTrue(log.toString().contains("config=null"));
-
-        if (log.isDebugEnabled())
-            log.debug("This is 'debug' message.");
-        else
-            System.out.println("DEBUG level is not enabled.");
-
-        if (log.isInfoEnabled())
-            log.info("This is 'info' message.");
-        else
-            System.out.println("INFO level is not enabled.");
-
-        log.warning("This is 'warning' message.");
-        log.error("This is 'error' message.");
-    }
-}
diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jWatchDelayTest.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jWatchDelayTest.java
deleted file mode 100644
index f9306fe..0000000
--- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/GridLog4jWatchDelayTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.logger.log4j;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import org.apache.ignite.IgniteCheckedException;
-import org.junit.Test;
-
-/**
- * Checking Log4JLogger constructors accepting watchDelay parameter.
- */
-public class GridLog4jWatchDelayTest {
-    /** Path to log4j configuration file. */
-    private static final String LOG_CONFIG = "modules/log4j/src/test/config/log4j-info.xml";
-
-    /** Check negative watchDelay in String constructor. */
-    @Test(expected = IgniteCheckedException.class)
-    public void testNegativeWatchDelayString() throws IgniteCheckedException {
-        new Log4JLogger(LOG_CONFIG, -1);
-    }
-
-    /** Check negative watchDelay in String constructor. */
-    @Test(expected = IgniteCheckedException.class)
-    public void testNegativeWatchDelayFile() throws IgniteCheckedException {
-        new Log4JLogger(new File(LOG_CONFIG), -1);
-    }
-
-    /** Check negative watchDelay in String constructor. */
-    @Test(expected = IgniteCheckedException.class)
-    public void testNegativeWatchDelayUrl() throws IgniteCheckedException, MalformedURLException {
-        new Log4JLogger(new File(LOG_CONFIG).toURI().toURL(), -1);
-    }
-}
diff --git a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/package-info.java b/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/package-info.java
deleted file mode 100644
index a00e114..0000000
--- a/modules/log4j/src/test/java/org/apache/ignite/logger/log4j/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * <!-- Package description. -->
- * Contains internal tests or test related classes and interfaces.
- */
-
-package org.apache.ignite.logger.log4j;
diff --git a/modules/log4j/src/test/java/org/apache/ignite/testsuites/IgniteLog4jTestSuite.java b/modules/log4j/src/test/java/org/apache/ignite/testsuites/IgniteLog4jTestSuite.java
deleted file mode 100644
index c7a099c..0000000
--- a/modules/log4j/src/test/java/org/apache/ignite/testsuites/IgniteLog4jTestSuite.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.testsuites;
-
-import org.apache.ignite.logger.log4j.GridLog4jConfigUpdateTest;
-import org.apache.ignite.logger.log4j.GridLog4jCorrectFileNameTest;
-import org.apache.ignite.logger.log4j.GridLog4jInitializedTest;
-import org.apache.ignite.logger.log4j.GridLog4jLoggingFileTest;
-import org.apache.ignite.logger.log4j.GridLog4jLoggingPathTest;
-import org.apache.ignite.logger.log4j.GridLog4jLoggingUrlTest;
-import org.apache.ignite.logger.log4j.GridLog4jNotInitializedTest;
-import org.apache.ignite.logger.log4j.GridLog4jWatchDelayTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Log4j logging tests.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-    GridLog4jInitializedTest.class,
-    GridLog4jNotInitializedTest.class,
-    GridLog4jCorrectFileNameTest.class,
-    GridLog4jLoggingFileTest.class,
-    GridLog4jLoggingPathTest.class,
-    GridLog4jLoggingUrlTest.class,
-    GridLog4jConfigUpdateTest.class,
-    GridLog4jWatchDelayTest.class,
-})
-public class IgniteLog4jTestSuite { }
diff --git a/modules/log4j2/README.txt b/modules/log4j2/README.txt
index 6e21b7a..ade743d 100644
--- a/modules/log4j2/README.txt
+++ b/modules/log4j2/README.txt
@@ -14,7 +14,7 @@
     ...
     <property name="gridLogger">
         <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
-            <constructor-arg type="java.lang.String" value="config/ignite-log4j2.xml"/>
+            <constructor-arg type="java.lang.String" value="config/ignite-log4j.xml"/>
         </bean>
     </property>
     ...
diff --git a/modules/log4j2/pom.xml b/modules/log4j2/pom.xml
index fb9faae..2cba3ad 100644
--- a/modules/log4j2/pom.xml
+++ b/modules/log4j2/pom.xml
@@ -56,13 +56,11 @@
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-api</artifactId>
-            <version>${log4j2.version}</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-core</artifactId>
-            <version>${log4j2.version}</version>
         </dependency>
     </dependencies>
 
diff --git a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
index 954c7c8..2dde4fd 100644
--- a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
+++ b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
@@ -33,10 +33,10 @@
 import org.apache.ignite.logger.LoggerNodeIdAndApplicationAware;
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.Marker;
 import org.apache.logging.log4j.MarkerManager;
 import org.apache.logging.log4j.core.Appender;
-import org.apache.logging.log4j.core.Logger;
 import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.appender.ConsoleAppender;
 import org.apache.logging.log4j.core.appender.FileAppender;
@@ -45,11 +45,19 @@
 import org.apache.logging.log4j.core.config.AppenderControl;
 import org.apache.logging.log4j.core.config.Configuration;
 import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.DefaultConfiguration;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilder;
+import org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilderFactory;
+import org.apache.logging.log4j.core.config.builder.api.RootLoggerComponentBuilder;
+import org.apache.logging.log4j.core.config.builder.impl.BuiltConfiguration;
 import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_CONSOLE_APPENDER;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_QUIET;
+import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_ERR;
+import static org.apache.logging.log4j.core.appender.ConsoleAppender.Target.SYSTEM_OUT;
 
 /**
  * Log4j2-based implementation for logging. This logger should be used
@@ -59,7 +67,7 @@
  * <pre name="code" class="xml">
  *      &lt;property name="gridLogger"&gt;
  *          &lt;bean class="org.apache.ignite.logger.log4j2.Log4J2Logger"&gt;
- *              &lt;constructor-arg type="java.lang.String" value="config/ignite-log4j2.xml"/&gt;
+ *              &lt;constructor-arg type="java.lang.String" value="config/ignite-log4j.xml"/&gt;
  *          &lt;/bean>
  *      &lt;/property&gt;
  * </pre>
@@ -116,9 +124,21 @@
     private volatile UUID nodeId;
 
     /**
+     * Creates new logger and automatically detects if root logger already
+     * has appenders configured. If it does not, the root logger will be
+     * configured with default appender, otherwise, existing appenders will be used.
+     */
+    public Log4J2Logger() {
+        addConsoleAppenderIfNeeded(init -> LogManager.getRootLogger());
+
+        quiet = quiet0;
+        cfg = null;
+    }
+
+    /**
      * Creates new logger with given implementation.
      *
-     * @param impl Log4j implementation to use.
+     * @param impl Log4j2 implementation to use.
      */
     private Log4J2Logger(final Logger impl, String path) {
         assert impl != null;
@@ -151,9 +171,9 @@
         addConsoleAppenderIfNeeded(new C1<Boolean, Logger>() {
             @Override public Logger apply(Boolean init) {
                 if (init)
-                    Configurator.initialize(LogManager.ROOT_LOGGER_NAME, cfgUrl.toString());
+                    Configurator.initialize(LoggerConfig.ROOT, cfgUrl.toString());
 
-                return (Logger)LogManager.getRootLogger();
+                return LogManager.getRootLogger();
             }
         });
 
@@ -179,9 +199,9 @@
         addConsoleAppenderIfNeeded(new C1<Boolean, Logger>() {
             @Override public Logger apply(Boolean init) {
                 if (init)
-                    Configurator.initialize(LogManager.ROOT_LOGGER_NAME, path);
+                    Configurator.initialize(LoggerConfig.ROOT, path);
 
-                return (Logger)LogManager.getRootLogger();
+                return LogManager.getRootLogger();
             }
         });
 
@@ -202,9 +222,9 @@
         addConsoleAppenderIfNeeded(new C1<Boolean, Logger>() {
             @Override public Logger apply(Boolean init) {
                 if (init)
-                    Configurator.initialize(LogManager.ROOT_LOGGER_NAME, cfgUrl.toString());
+                    Configurator.initialize(LoggerConfig.ROOT, cfgUrl.toString());
 
-                return (Logger)LogManager.getRootLogger();
+                return LogManager.getRootLogger();
             }
         });
 
@@ -227,8 +247,10 @@
 
     /** {@inheritDoc} */
     @Nullable @Override public String fileName() {
-        for (Logger log = impl; log != null; log = log.getParent()) {
-            for (Appender a : log.getAppenders().values()) {
+        Configuration cfg = LoggerContext.getContext(false).getConfiguration();
+
+        for (LoggerConfig logCfg = cfg.getLoggerConfig(impl.getName()); logCfg != null; logCfg = logCfg.getParent()) {
+            for (Appender a : logCfg.getAppenders().values()) {
                 if (a instanceof FileAppender)
                     return ((FileAppender)a).getFileName();
 
@@ -294,46 +316,17 @@
             // Init logger impl.
             impl = initLogClo.apply(true);
 
-            boolean quiet = Boolean.valueOf(System.getProperty(IGNITE_QUIET, "true"));
+            boolean quiet = Boolean.parseBoolean(System.getProperty(IGNITE_QUIET, "true"));
 
-            boolean consoleAppenderFound = false;
-            Logger rootLogger = null;
-
-            for (Logger log = impl; log != null; ) {
-                if (!consoleAppenderFound) {
-                    for (Appender appender : log.getAppenders().values()) {
-                        if (appender instanceof ConsoleAppender) {
-                            if ("CONSOLE_ERR".equals(appender.getName()))
-                                continue;
-
-                            consoleAppenderFound = true;
-
-                            break;
-                        }
-                    }
-                }
-
-                if (log.getParent() == null) {
-                    rootLogger = log;
-
-                    break;
-                }
-                else
-                    log = log.getParent();
-            }
+            boolean consoleAppenderFound = isConsoleAppenderConfigured();
 
             if (consoleAppenderFound && quiet)
-                // User configured console appender, but log is quiet.
-                quiet = false;
+                quiet = false;  // User configured console appender, but log is quiet.
 
-            if (!consoleAppenderFound && !quiet &&
-                Boolean.valueOf(System.getProperty(IGNITE_CONSOLE_APPENDER, "true"))) {
-                // Console appender not found => we've looked through all categories up to root.
-                assert rootLogger != null;
-
+            if (!consoleAppenderFound && !quiet && Boolean.parseBoolean(System.getProperty(IGNITE_CONSOLE_APPENDER, "true"))) {
                 // User launched ignite in verbose mode and did not add console appender with INFO level
                 // to configuration and did not set IGNITE_CONSOLE_APPENDER to false.
-                createConsoleLogger();
+                configureConsoleAppender();
             }
 
             quiet0 = quiet;
@@ -341,39 +334,86 @@
         }
     }
 
+    /** */
+    private boolean isConsoleAppenderConfigured() {
+        Configuration cfg = LoggerContext.getContext(false).getConfiguration();
+
+        if (cfg instanceof DefaultConfiguration)
+            return false;
+
+        for (LoggerConfig logCfg = cfg.getLoggerConfig(impl.getName()); logCfg != null; logCfg = logCfg.getParent()) {
+            for (Appender appender : logCfg.getAppenders().values()) {
+                if (appender instanceof ConsoleAppender) {
+                    if (((ConsoleAppender)appender).getTarget() == SYSTEM_ERR)
+                        continue;
+
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
     /**
      * Creates console appender with some reasonable default logging settings.
      *
      * @return Logger with auto configured console appender.
      */
-    public Logger createConsoleLogger() {
+    public Logger configureConsoleAppender() {
         // from http://logging.apache.org/log4j/2.x/manual/customconfig.html
-        final LoggerContext ctx = impl.getContext();
+        LoggerContext ctx = LoggerContext.getContext(false);
 
-        final Configuration cfg = ctx.getConfiguration();
+        Configuration cfg = ctx.getConfiguration();
 
-        PatternLayout.Builder builder = PatternLayout.newBuilder()
+        if (cfg instanceof DefaultConfiguration) {
+            ConfigurationBuilder<BuiltConfiguration> cfgBuilder = ConfigurationBuilderFactory.newConfigurationBuilder();
+
+            RootLoggerComponentBuilder rootLog = cfgBuilder.newRootLogger(Level.INFO);
+
+            cfg = cfgBuilder.add(rootLog).build();
+
+            addConsoleAppender(cfg);
+
+            ctx.reconfigure(cfg);
+        }
+        else {
+            addConsoleAppender(cfg);
+
+            ctx.updateLoggers();
+        }
+
+        return ctx.getRootLogger();
+    }
+
+    /** */
+    private void addConsoleAppender(Configuration logCfg) {
+        PatternLayout layout = PatternLayout.newBuilder()
             .withPattern("%d{ISO8601}][%-5p][%t][%c{1}] %m%n")
             .withCharset(Charset.defaultCharset())
             .withAlwaysWriteExceptions(false)
-            .withNoConsoleNoAnsi(false);
+            .withNoConsoleNoAnsi(false)
+            .build();
 
-        PatternLayout layout = builder.build();
-
-        ConsoleAppender.Builder consoleAppenderBuilder = ConsoleAppender.newBuilder()
-            .withName(CONSOLE_APPENDER)
-            .withLayout(layout);
-
-        ConsoleAppender consoleApp = consoleAppenderBuilder.build();
+        ConsoleAppender consoleApp = ConsoleAppender.newBuilder()
+            .setTarget(SYSTEM_OUT)
+            .setName(CONSOLE_APPENDER)
+            .setLayout(layout)
+            .build();
 
         consoleApp.start();
 
-        cfg.addAppender(consoleApp);
-        cfg.getRootLogger().addAppender(consoleApp, Level.TRACE, null);
+        logCfg.addAppender(consoleApp);
+        logCfg.getRootLogger().addAppender(consoleApp, Level.TRACE, null);
+    }
 
-        ctx.updateLoggers(cfg);
-
-        return ctx.getRootLogger();
+    /**
+     * Checks if Log4j is already configured within this VM or not.
+     *
+     * @return {@code True} if log4j was already configured, {@code false} otherwise.
+     */
+    public static boolean isConfigured() {
+        return !(LoggerContext.getContext(false).getConfiguration() instanceof DefaultConfiguration);
     }
 
     /** {@inheritDoc} */
@@ -387,8 +427,6 @@
         System.setProperty(APP_ID, application != null ? application : "ignite");
 
         if (inited) {
-            final LoggerContext ctx = impl.getContext();
-
             synchronized (mux) {
                 inited = false;
             }
@@ -396,9 +434,9 @@
             addConsoleAppenderIfNeeded(new C1<Boolean, Logger>() {
                 @Override public Logger apply(Boolean init) {
                     if (init)
-                        ctx.reconfigure();
+                        LoggerContext.getContext(false).reconfigure();
 
-                    return (Logger)LogManager.getRootLogger();
+                    return LogManager.getRootLogger();
                 }
             });
         }
@@ -420,17 +458,17 @@
      */
     @Override public Log4J2Logger getLogger(Object ctgr) {
         if (ctgr == null)
-            return new Log4J2Logger((Logger)LogManager.getRootLogger(), cfg);
+            return new Log4J2Logger(LogManager.getRootLogger(), cfg);
 
         if (ctgr instanceof Class) {
             String name = ((Class<?>)ctgr).getName();
 
-            return new Log4J2Logger((Logger)LogManager.getLogger(name), cfg);
+            return new Log4J2Logger(LogManager.getLogger(name), cfg);
         }
 
         String name = ctgr.toString();
 
-        return new Log4J2Logger((Logger)LogManager.getLogger(name), cfg);
+        return new Log4J2Logger(LogManager.getLogger(name), cfg);
     }
 
     /** {@inheritDoc} */
diff --git a/config/ignite-log4j2.xml b/modules/log4j2/src/test/config/log4j2-test.xml
similarity index 62%
rename from config/ignite-log4j2.xml
rename to modules/log4j2/src/test/config/log4j2-test.xml
index ee4e268..9740c2c 100644
--- a/config/ignite-log4j2.xml
+++ b/modules/log4j2/src/test/config/log4j2-test.xml
@@ -17,7 +17,7 @@
   limitations under the License.
 -->
 
-<Configuration monitorInterval="60">
+<Configuration>
     <Appenders>
         <Console name="CONSOLE" target="SYSTEM_OUT">
             <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}]%notEmpty{[%markerSimpleName]} %m%n"/>
@@ -28,12 +28,6 @@
             <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}]%notEmpty{[%markerSimpleName]} %m%n"/>
         </Console>
 
-        <File name="CONSISTENCY" fileName="${sys:IGNITE_HOME}/work/log/consistency.log">
-            <PatternLayout>
-                <Pattern>"[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"</Pattern>
-            </PatternLayout>
-        </File>
-
         <Routing name="FILE">
             <Routes pattern="$${sys:nodeId}">
                 <Route>
@@ -51,40 +45,12 @@
     </Appenders>
 
     <Loggers>
-        <!--
-        <Logger name="org.apache.ignite" level=DEBUG/>
-        -->
-
-        <!--
-            Uncomment to disable courtesy notices, such as SPI configuration
-            consistency warnings.
-        -->
-        <!--
-        <Logger name="org.apache.ignite.CourtesyConfigNotice" level=OFF/>
-        -->
-
-        <Logger name="org.springframework" level="WARN"/>
-        <Logger name="org.eclipse.jetty" level="WARN"/>
-
-        <Logger name="org.apache.ignite.internal.visor.consistency" additivity="false" level="INFO">
-            <AppenderRef ref="CONSISTENCY"/>
-        </Logger>
-
-        <!--
-        Avoid warnings about failed bind attempt when multiple nodes running on the same host.
-        -->
-        <Logger name="org.eclipse.jetty.util.log" level="ERROR"/>
-        <Logger name="org.eclipse.jetty.util.component" level="ERROR"/>
-
-        <Logger name="com.amazonaws" level="WARN"/>
+        <Logger name="org" level="INFO"/>
+        <Logger name="org.eclipse.jetty" level="INFO"/>
 
         <Root level="INFO">
-            <!-- Uncomment to enable logging to console. -->
-            <!--
             <AppenderRef ref="CONSOLE" level="DEBUG"/>
-            -->
-
-            <AppenderRef ref="CONSOLE_ERR" level="ERROR"/>
+            <AppenderRef ref="CONSOLE_ERR" level="WARN"/>
             <AppenderRef ref="FILE" level="DEBUG"/>
         </Root>
     </Loggers>
diff --git a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java
index 137cb98..6c2571c 100644
--- a/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java
+++ b/modules/log4j2/src/test/java/org/apache/ignite/logger/log4j2/Log4j2LoggerSelfTest.java
@@ -42,10 +42,10 @@
  */
 public class Log4j2LoggerSelfTest {
     /** */
-    private static final String LOG_PATH_TEST = "modules/core/src/test/config/log4j2-test.xml";
+    private static final String LOG_PATH_TEST = "modules/log4j2/src/test/config/log4j2-test.xml";
 
     /** */
-    private static final String LOG_PATH_MAIN = "config/ignite-log4j2.xml";
+    private static final String LOG_PATH_MAIN = "config/ignite-log4j.xml";
 
     /** */
     @Before
diff --git a/modules/ml/pom.xml b/modules/ml/pom.xml
index 9029a95..62e0dad 100644
--- a/modules/ml/pom.xml
+++ b/modules/ml/pom.xml
@@ -83,8 +83,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/ml/spark-model-parser/pom.xml b/modules/ml/spark-model-parser/pom.xml
index 7cc7ebd..eed310b 100644
--- a/modules/ml/spark-model-parser/pom.xml
+++ b/modules/ml/spark-model-parser/pom.xml
@@ -87,6 +87,10 @@
             <version>2.9.1</version>
             <exclusions>
                 <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
                     <groupId>org.slf4j</groupId>
                     <artifactId>slf4j-log4j12</artifactId>
                 </exclusion>
diff --git a/modules/numa-allocator/pom.xml b/modules/numa-allocator/pom.xml
index 62cfa2c..b9b3f04 100644
--- a/modules/numa-allocator/pom.xml
+++ b/modules/numa-allocator/pom.xml
@@ -83,8 +83,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/modules/opencensus/pom.xml b/modules/opencensus/pom.xml
index f556f84..87f3888 100644
--- a/modules/opencensus/pom.xml
+++ b/modules/opencensus/pom.xml
@@ -55,7 +55,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/platforms/cpp/core-test/src/test_utils.cpp b/modules/platforms/cpp/core-test/src/test_utils.cpp
index a123a46..fe96cdc 100644
--- a/modules/platforms/cpp/core-test/src/test_utils.cpp
+++ b/modules/platforms/cpp/core-test/src/test_utils.cpp
@@ -55,6 +55,8 @@
 
         assert(cfgFile != 0);
 
+        cfg.igniteHome = jni::ResolveIgniteHome();
+
         cfg.jvmOpts.push_back("-Xdebug");
         cfg.jvmOpts.push_back("-Xnoagent");
         cfg.jvmOpts.push_back("-Djava.compiler=NONE");
@@ -65,8 +67,8 @@
         cfg.jvmOpts.push_back("-DIGNITE_UPDATE_NOTIFIER=false");
         cfg.jvmOpts.push_back("-DIGNITE_LOG_CLASSPATH_CONTENT_ON_STARTUP=false");
         cfg.jvmOpts.push_back("-Duser.language=en");
+        cfg.jvmOpts.push_back("-Dlog4j.configurationFile=" + cfg.igniteHome + "/modules/core/src/test/config/log4j2-test.xml");
 
-        cfg.igniteHome = jni::ResolveIgniteHome();
         cfg.jvmClassPath = jni::CreateIgniteHomeClasspath(cfg.igniteHome, true);
 
 #ifdef IGNITE_TESTS_32
diff --git a/modules/platforms/cpp/odbc-test/src/test_utils.cpp b/modules/platforms/cpp/odbc-test/src/test_utils.cpp
index 0f1affd..05d93ab 100644
--- a/modules/platforms/cpp/odbc-test/src/test_utils.cpp
+++ b/modules/platforms/cpp/odbc-test/src/test_utils.cpp
@@ -105,6 +105,8 @@
 
         assert(cfgFile != 0);
 
+        cfg.igniteHome = jni::ResolveIgniteHome();
+
         cfg.jvmOpts.push_back("-Xdebug");
         cfg.jvmOpts.push_back("-Xnoagent");
         cfg.jvmOpts.push_back("-Djava.compiler=NONE");
@@ -115,10 +117,10 @@
         cfg.jvmOpts.push_back("-DIGNITE_UPDATE_NOTIFIER=false");
         cfg.jvmOpts.push_back("-DIGNITE_LOG_CLASSPATH_CONTENT_ON_STARTUP=false");
         cfg.jvmOpts.push_back("-Duser.language=en");
+        cfg.jvmOpts.push_back("-Dlog4j.configurationFile=" + cfg.igniteHome + "/modules/core/src/test/config/log4j2-test.xml");
         // Un-comment to debug SSL
         //cfg.jvmOpts.push_back("-Djavax.net.debug=ssl");
 
-        cfg.igniteHome = jni::ResolveIgniteHome();
         cfg.jvmClassPath = jni::CreateIgniteHomeClasspath(cfg.igniteHome, true);
 
 #ifdef IGNITE_TESTS_32
diff --git a/modules/platforms/cpp/thin-client-test/config/with-logging-0.xml b/modules/platforms/cpp/thin-client-test/config/with-logging-0.xml
index 3a52964..6e99ac2 100644
--- a/modules/platforms/cpp/thin-client-test/config/with-logging-0.xml
+++ b/modules/platforms/cpp/thin-client-test/config/with-logging-0.xml
@@ -28,7 +28,12 @@
 
     <bean parent="test.cfg">
         <property name="gridLogger">
-            <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
+            <!--
+                CPP tests starts JVM only once and reuses it. Since Log4j2Logger is designed to be configured
+                only once per JVM, we need to either restart JVM or use another logger implementation to start node with
+                different logging configurations.
+             -->
+            <bean class="org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger">
                 <constructor-arg type="java.lang.String" value="${IGNITE_NATIVE_TEST_CPP_THIN_CONFIG_PATH}/log/log4j-0.xml"/>
             </bean>
         </property>
diff --git a/modules/platforms/cpp/thin-client-test/src/test_utils.cpp b/modules/platforms/cpp/thin-client-test/src/test_utils.cpp
index 468cc36..04a5f71 100644
--- a/modules/platforms/cpp/thin-client-test/src/test_utils.cpp
+++ b/modules/platforms/cpp/thin-client-test/src/test_utils.cpp
@@ -59,6 +59,8 @@
 
         assert(cfgFile != 0);
 
+        cfg.igniteHome = jni::ResolveIgniteHome();
+
         cfg.jvmOpts.push_back("-Xdebug");
         cfg.jvmOpts.push_back("-Xnoagent");
         cfg.jvmOpts.push_back("-Djava.compiler=NONE");
@@ -69,10 +71,10 @@
         cfg.jvmOpts.push_back("-DIGNITE_UPDATE_NOTIFIER=false");
         cfg.jvmOpts.push_back("-DIGNITE_LOG_CLASSPATH_CONTENT_ON_STARTUP=false");
         cfg.jvmOpts.push_back("-Duser.language=en");
+        cfg.jvmOpts.push_back("-Dlog4j.configurationFile=" + cfg.igniteHome + "/modules/core/src/test/config/log4j2-test.xml");
         // Un-comment to debug SSL
         // cfg.jvmOpts.push_back("-Djavax.net.debug=ssl");
 
-        cfg.igniteHome = jni::ResolveIgniteHome();
         cfg.jvmClassPath = jni::CreateIgniteHomeClasspath(cfg.igniteHome, true);
 
 #ifdef IGNITE_TESTS_32
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Log/custom-log.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Log/custom-log.xml
index 5d7dc65..8a3491d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Log/custom-log.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Log/custom-log.xml
@@ -26,7 +26,7 @@
         <property name="connectorConfiguration"><null/></property>
 
         <property name="gridLogger">
-            <bean class="org.apache.ignite.logger.log4j.Log4JLogger">
+            <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
                 <constructor-arg type="java.lang.String" value="config\log\dotnet-log4j.xml"/>
             </bean>
         </property>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Log/dotnet-log4j.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Log/dotnet-log4j.xml
index 9d6aefd..f881b03 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Log/dotnet-log4j.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Log/dotnet-log4j.xml
@@ -17,127 +17,68 @@
   limitations under the License.
 -->
 
-<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN"
-    "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
-<!--
-    Default log4j configuration for Ignite.
--->
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-    <!--
-        Logs System.out messages to console.
-    -->
-    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-        <!-- Log to STDOUT. -->
-        <param name="Target" value="System.out"/>
+<Configuration>
+    <Appenders>
+        <Console name="CONSOLE" target="SYSTEM_OUT">
+            <LevelRangeFilter minLevel="INFO" maxLevel="DEBUG"/>
+            <PatternLayout pattern="[%d{dd-MM-yyyy HH:mm:ss}][%-5p][%t][%c{1}] %m%n"/>
+        </Console>
 
-        <!-- Log from DEBUG and higher. -->
-        <param name="Threshold" value="DEBUG"/>
+        <Console name="CONSOLE_ERR" target="SYSTEM_ERR">
+            <PatternLayout pattern="[%d{dd-MM-yyyy HH:mm:ss}][%-5p][%t][%c{1}] %m%n"/>
+        </Console>
 
-        <!-- The default pattern: Date Priority [Category] Message\n -->
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{dd-MM-yyyy HH:mm:ss}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
+        <RollingFile name="FILE"
+                     append="true"
+                     fileName="${sys:IGNITE_HOME}/work/log/dotnet-logger-test.log"
+                     filePattern="${sys:IGNITE_HOME}/work/log/dotnet-logger-test.log.%i">
+            <PatternLayout pattern="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
+            <Policies>
+                <SizeBasedTriggeringPolicy size="10 MB"/>
+            </Policies>
+            <DefaultRolloverStrategy max="10"/>
+        </RollingFile>
+    </Appenders>
 
-        <!-- Do not log beyond INFO level. -->
-        <filter class="org.apache.log4j.varia.LevelRangeFilter">
-            <param name="levelMin" value="DEBUG"/>
-            <param name="levelMax" value="INFO"/>
-        </filter>
-    </appender>
+    <Loggers>
+        <!--
+            Uncomment to enable Ignite debugging.
+        -->
+        <!--
+            <Logger name="org.apache.ignite" level="DEBUG"/>
+        -->
 
-    <!--
-        Logs all System.err messages to console.
-    -->
-    <appender name="CONSOLE_ERR" class="org.apache.log4j.ConsoleAppender">
-        <!-- Log to STDERR. -->
-        <param name="Target" value="System.err"/>
+        <!--
+            Uncomment this category to enable cache query execution tracing.
+        -->
+        <!--
+            <Logger name="org.apache.ignite.cache.queries" level="DEBUG"/>
+        -->
 
-        <!-- Log from WARN and higher. -->
-        <param name="Threshold" value="WARN"/>
+        <!--
+            Uncomment to enable DGC tracing.
+        -->
+        <!--
+            <Logger name="org.apache.ignite.grid.kernal.processors.cache.GridCacheDgcManager.trace" level="DEBUG"/>
+        -->
 
-        <!-- The default pattern: Date Priority [Category] Message\n -->
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{dd-MMM-yyyy HH:mm:ss}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
+        <!--
+            Uncomment to disable courtesy notice.
+        -->
+        <!--
+           <Logger name="org.apache.ignite.CourtesyConfigNotice" level="OFF"/>
+        -->
 
-    <!--
-        Logs all output to specified file.
-        By default, the logging goes to IGNITE_HOME/work/log folder
+        <Logger name="org.springframework" level="WARN"/>
 
-        Note, this appender is disabled by default.
-        To enable, uncomment the section below and also FILE appender in the <root> element.
-    -->
-    <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
-        <param name="Threshold" value="DEBUG"/>
-        <param name="File" value="${IGNITE_HOME}/work/log/dotnet-logger-test.log"/>
-        <param name="Append" value="true"/>
-        <param name="MaxFileSize" value="10MB"/>
-        <param name="MaxBackupIndex" value="10"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="[%d{ISO8601}][%-5p][%t][%c{1}] %m%n"/>
-        </layout>
-    </appender>
+        <Logger name="org.eclipse.jetty" level="FATAL"/>
 
-    <!--
-        Uncomment to enable Ignite debugging.
-    -->
-    <!--
-    <category name="org.apache.ignite">
-        <level value="DEBUG"/>
-    </category>
-    -->
+        <Logger name="com.amazonaws" level="WARN"/>
 
-    <!--
-        Uncomment this category to enable cache
-        query execution tracing.
-    -->
-    <!--
-    <category name="org.apache.ignite.cache.queries">
-        <level value="DEBUG"/>
-    </category>
-    -->
-
-    <!--
-        Uncomment to enable DGC tracing.
-    -->
-    <!--
-    <category name="org.apache.ignite.grid.kernal.processors.cache.GridCacheDgcManager.trace">
-        <level value="DEBUG"/>
-    </category>
-    -->
-
-    <!--
-        Uncomment to disable courtesy notice.
-    -->
-    <!--
-    <category name="org.apache.ignite.CourtesyConfigNotice">
-        <level value="OFF"/>
-    </category>
-    -->
-
-    <category name="org.springframework">
-        <level value="WARN"/>
-    </category>
-
-    <category name="org.eclipse.jetty">
-        <level value="FATAL"/>
-    </category>
-
-    <category name="com.amazonaws">
-        <level value="WARN"/>
-    </category>
-
-    <!-- Default settings. -->
-    <root>
-        <!-- Print out all info by default. -->
-        <level value="DEBUG"/>
-
-        <!-- Append to console. -->
-        <appender-ref ref="CONSOLE"/>
-        <appender-ref ref="CONSOLE_ERR"/>
-
-        <!-- Uncomment to enable logging to a file. -->
-        <appender-ref ref="FILE"/>
-    </root>
-</log4j:configuration>
+        <Root level="DEBUG">
+            <AppenderRef ref="CONSOLE" level="DEBUG"/>
+            <AppenderRef ref="CONSOLE_ERR" level="WARN"/>
+            <AppenderRef ref="FILE" level="DEBUG"/>
+        </Root>
+    </Loggers>
+</Configuration>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/DefaultLoggerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/DefaultLoggerTest.cs
index fd84cb7..09856a3 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/DefaultLoggerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Log/DefaultLoggerTest.cs
@@ -98,11 +98,11 @@
                     Assert.IsTrue(log.Contains("[DEBUG][main][=DOTNET=] DOTNET-Debug"));
 
                     Assert.IsTrue(log.Contains("[WARN ][main][=DOTNET=] DOTNET-Warn"));
-                    Assert.IsTrue(log.Contains("class org.apache.ignite.IgniteException: " +
+                    Assert.IsTrue(log.Contains("org.apache.ignite.IgniteException: " +
                                                "Platform error:System.Exception: EXCEPTION_TEST_Warn"));
 
                     Assert.IsTrue(log.Contains("[ERROR][main][=DOTNET=] DOTNET-Error"));
-                    Assert.IsTrue(log.Contains("class org.apache.ignite.IgniteException: " +
+                    Assert.IsTrue(log.Contains("org.apache.ignite.IgniteException: " +
                                                "Platform error:System.Exception: EXCEPTION_TEST_Error"));
                 }
             }
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/TestUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/TestUtils.cs
index 2ab0594..5e729bf 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/TestUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/TestUtils.cs
@@ -137,6 +137,8 @@
                 foreach (string opt in JvmDebugOpts)
                     ops.Add(opt);
             }
+            
+            ops.Add("-Dlog4j.configurationFile=" + IgniteHome.Resolve() + "/modules/core/src/test/config/log4j2-test.xml");
 
             return ops;
         }
diff --git a/modules/rest-http/pom.xml b/modules/rest-http/pom.xml
index 31b0027..f326f42 100644
--- a/modules/rest-http/pom.xml
+++ b/modules/rest-http/pom.xml
@@ -120,8 +120,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
index c0c63c6..0220395 100644
--- a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
+++ b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
@@ -62,35 +62,11 @@
      */
     static {
         if (!IgniteSystemProperties.getBoolean(IGNITE_JETTY_LOG_NO_OVERRIDE)) {
-            // See also https://www.eclipse.org/jetty/documentation/9.4.x/configuring-logging.html
+            // See also https://www.eclipse.org/jetty/documentation/jetty-9/index.html#configuring-jetty-logging
             // It seems that using system properties should be fine.
             System.setProperty("org.eclipse.jetty.LEVEL", "WARN");
             System.setProperty("org.eclipse.jetty.util.log.LEVEL", "OFF");
             System.setProperty("org.eclipse.jetty.util.component.LEVEL", "OFF");
-
-            try {
-                Class<?> logCls = Class.forName("org.apache.log4j.Logger");
-
-                String ctgrJetty = "org.eclipse.jetty";                         // WARN for this category.
-                String ctgrJettyUtil = "org.eclipse.jetty.util.log";            // ERROR for this...
-                String ctgrJettyUtilComp = "org.eclipse.jetty.util.component";  // ...and this.
-
-                Object logJetty = logCls.getMethod("getLogger", String.class).invoke(logCls, ctgrJetty);
-                Object logJettyUtil = logCls.getMethod("getLogger", String.class).invoke(logCls, ctgrJettyUtil);
-                Object logJettyUtilComp = logCls.getMethod("getLogger", String.class).invoke(logCls, ctgrJettyUtilComp);
-
-                Class<?> lvlCls = Class.forName("org.apache.log4j.Level");
-
-                Object warnLvl = lvlCls.getField("WARN").get(null);
-                Object errLvl = lvlCls.getField("ERROR").get(null);
-
-                logJetty.getClass().getMethod("setLevel", lvlCls).invoke(logJetty, warnLvl);
-                logJettyUtil.getClass().getMethod("setLevel", lvlCls).invoke(logJetty, errLvl);
-                logJettyUtilComp.getClass().getMethod("setLevel", lvlCls).invoke(logJetty, errLvl);
-            }
-            catch (Exception ignored) {
-                // No-op.
-            }
         }
     }
 
diff --git a/modules/schedule/pom.xml b/modules/schedule/pom.xml
index d28da7f..99738be 100644
--- a/modules/schedule/pom.xml
+++ b/modules/schedule/pom.xml
@@ -74,8 +74,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/modules/slf4j/pom.xml b/modules/slf4j/pom.xml
index d4f2bd2..6565160 100644
--- a/modules/slf4j/pom.xml
+++ b/modules/slf4j/pom.xml
@@ -62,14 +62,12 @@
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-slf4j-impl</artifactId>
-            <version>${log4j2.version}</version>
             <scope>test</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-core</artifactId>
-            <version>${log4j2.version}</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/modules/spring/pom.xml b/modules/spring/pom.xml
index ae6a22c..7640779 100644
--- a/modules/spring/pom.xml
+++ b/modules/spring/pom.xml
@@ -65,7 +65,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/ssh/pom.xml b/modules/ssh/pom.xml
index 50dad06..9c61d9d 100644
--- a/modules/ssh/pom.xml
+++ b/modules/ssh/pom.xml
@@ -54,7 +54,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/modules/urideploy/pom.xml b/modules/urideploy/pom.xml
index cf8b0f0..360a549 100644
--- a/modules/urideploy/pom.xml
+++ b/modules/urideploy/pom.xml
@@ -144,8 +144,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
index d9e34ab..6801c21 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala
@@ -130,31 +130,18 @@
                             url
                     }
 
-                // Add no-op logger to remove no-appender warning.
-                val log4jTup =
-                    if (visor.quiet) {
-                        val springLog = Logger.getLogger("org.springframework")
+                if (visor.quiet) {
+                    val springLog = Logger.getLogger("org.springframework")
 
-                        if (springLog != null)
-                            springLog.setLevel(Level.WARNING)
-
-                        null
-                    }
-                    else if (classOf[Ignition].getClassLoader.getResource("org/apache/log4j/Appender.class") != null)
-                        U.addLog4jNoOpLogger()
-                    else
-                        null
+                    if (springLog != null)
+                        springLog.setLevel(Level.WARNING)
+                }
 
                 val spring: IgniteSpringHelper = SPRING.create(false)
 
                 val cfgs =
-                    try
-                        // Cache, indexing SPI configurations should be excluded from daemon node config.
-                        spring.loadConfigurations(url, "cacheConfiguration", "lifecycleBeans", "indexingSpi").get1()
-                    finally {
-                        if (log4jTup != null && !visor.quiet)
-                            U.removeLog4jNoOpLogger(log4jTup)
-                    }
+                    // Cache, indexing SPI configurations should be excluded from daemon node config.
+                    spring.loadConfigurations(url, "cacheConfiguration", "lifecycleBeans", "indexingSpi").get1()
 
                 if (cfgs == null || cfgs.isEmpty)
                     throw new IgniteException("Can't find grid configuration in: " + url)
@@ -167,7 +154,7 @@
                 if (visor.quiet)
                     cfg.setGridLogger(new NullLogger)
                 else {
-                    if (log4jTup != null)
+                    if (classOf[Ignition].getClassLoader.getResource("org/apache/logging/log4j/core/Appender.class") != null)
                         System.setProperty(IgniteSystemProperties.IGNITE_CONSOLE_APPENDER, "false")
                     else
                         Logger.getGlobal.getHandlers.foreach({
diff --git a/modules/visor-plugins/pom.xml b/modules/visor-plugins/pom.xml
index ad3a303..59bb3a9 100644
--- a/modules/visor-plugins/pom.xml
+++ b/modules/visor-plugins/pom.xml
@@ -56,9 +56,8 @@
         </dependency>
 
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>${slf4j.version}</version>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
         </dependency>
         <!-- Third party dependencies -->
     </dependencies>
diff --git a/modules/visor-plugins/src/main/java/log4j.properties b/modules/visor-plugins/src/main/java/log4j2.properties
similarity index 70%
rename from modules/visor-plugins/src/main/java/log4j.properties
rename to modules/visor-plugins/src/main/java/log4j2.properties
index 092bf9f..cfc2382 100644
--- a/modules/visor-plugins/src/main/java/log4j.properties
+++ b/modules/visor-plugins/src/main/java/log4j2.properties
@@ -15,11 +15,17 @@
 # limitations under the License.
 #
 
-# Configure pf4j loggers.
-log4j.logger.ro.fortsoft.pf4j=ERROR, stdout
-
 # Configure console appender.
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.err
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%d{ISO8601}][%-5p][%t][%c{1}] %m%n
+appender.stdout.type=Console
+appender.stdout.name=stdout
+appender.stdout.target=SYSTEM_ERR
+appender.stdout.layout.type=PatternLayout
+appender.stdout.layout.pattern=[%d{ISO8601}][%-5p][%t][%c{1}] %m%n
+
+# Configure pf4j loggers.
+logger.pf4j.name=ro.fortsoft.pf4j
+logger.pf4j.level=ERROR
+logger.pf4j.appenderRef.$1.ref=stdout
+
+rootLogger.level=info
+rootLogger.appenderRef.$1.ref=stdout
diff --git a/modules/web/ignite-appserver-test/pom.xml b/modules/web/ignite-appserver-test/pom.xml
index c069313..80438f5 100644
--- a/modules/web/ignite-appserver-test/pom.xml
+++ b/modules/web/ignite-appserver-test/pom.xml
@@ -46,7 +46,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
         </dependency>
 
         <dependency>
diff --git a/modules/web/pom.xml b/modules/web/pom.xml
index 7b96bd9..a743f54 100644
--- a/modules/web/pom.xml
+++ b/modules/web/pom.xml
@@ -86,8 +86,8 @@
         </dependency>
 
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/modules/yardstick/pom-standalone.xml b/modules/yardstick/pom-standalone.xml
index c0795b0..c667650 100644
--- a/modules/yardstick/pom-standalone.xml
+++ b/modules/yardstick/pom-standalone.xml
@@ -60,7 +60,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
             <version>${project.version}</version>
         </dependency>
 
diff --git a/modules/yardstick/pom.xml b/modules/yardstick/pom.xml
index f5aff1c..7fe1a15 100644
--- a/modules/yardstick/pom.xml
+++ b/modules/yardstick/pom.xml
@@ -56,7 +56,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
         </dependency>
 
         <dependency>
diff --git a/modules/zookeeper/pom.xml b/modules/zookeeper/pom.xml
index 47cdf40..d823855 100644
--- a/modules/zookeeper/pom.xml
+++ b/modules/zookeeper/pom.xml
@@ -46,6 +46,10 @@
             <version>${zookeeper.version}</version>
             <exclusions>
                 <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
                     <groupId>org.slf4j</groupId>
                     <artifactId>slf4j-log4j12</artifactId>
                 </exclusion>
@@ -65,15 +69,8 @@
         </dependency>
 
         <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>${slf4j.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
             <scope>test</scope>
         </dependency>
 
@@ -109,7 +106,7 @@
 
         <dependency>
             <groupId>${project.groupId}</groupId>
-            <artifactId>ignite-log4j</artifactId>
+            <artifactId>ignite-log4j2</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/parent-internal/pom.xml b/parent-internal/pom.xml
index 7e07ba5..7b225d1 100644
--- a/parent-internal/pom.xml
+++ b/parent-internal/pom.xml
@@ -47,19 +47,11 @@
             </dependency>
 
             <dependency>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
-                <version>${log4j.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>com.sun.jdmk</groupId>
-                        <artifactId>jmxtools</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>com.sun.jmx</groupId>
-                        <artifactId>jmxri</artifactId>
-                    </exclusion>
-                </exclusions>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-bom</artifactId>
+                <version>${log4j2.version}</version>
+                <scope>import</scope>
+                <type>pom</type>
             </dependency>
         </dependencies>
     </dependencyManagement>
diff --git a/parent/pom.xml b/parent/pom.xml
index 5827c7a..9cf65b1 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -116,7 +116,6 @@
         <jtidy.version>r938</jtidy.version>
         <kafka.version>2.0.1</kafka.version>
         <log4j2.version>2.17.1</log4j2.version>
-        <log4j.version>1.2.17</log4j.version>
         <lucene.bundle.version>7.4.0_1</lucene.bundle.version>
         <lucene.version>8.11.2</lucene.version>
         <lz4.version>1.8.0</lz4.version>
diff --git a/pom.xml b/pom.xml
index 6580e0c..1460b08 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,6 @@
         <module>modules/ssh</module>
         <module>modules/rest-http</module>
         <module>modules/jta</module>
-        <module>modules/log4j</module>
         <module>modules/log4j2</module>
         <module>modules/slf4j</module>
         <module>modules/jcl</module>