Merge branch 'pr/13'
diff --git a/config/bootstrap/log4j.xml b/config/bootstrap/log4j.xml
deleted file mode 100755
index f6000d8..0000000
--- a/config/bootstrap/log4j.xml
+++ /dev/null
@@ -1,40 +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 SYSTEM "log4j.dtd">
-<log4j:configuration debug="false" xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-    <appender name="console" class="org.apache.log4j.ConsoleAppender">
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="%d (%-5p) %m%n"/>
-        </layout>
-    </appender>
-
-    <category name="org.apache.directory.fortress.core" class="org.apache.log4j.Logger" additivity="false">
-        <priority value="INFO" class="org.apache.log4j.Level"/>
-        <appender-ref ref="console"/>
-    </category>
-
-
-    <root>
-        <priority value="INFO" class="org.apache.log4j.Level"/>
-        <appender-ref ref="console"/>
-    </root>
-
-</log4j:configuration>
diff --git a/config/bootstrap/log4j2.xml b/config/bootstrap/log4j2.xml
new file mode 100755
index 0000000..f9bec85
--- /dev/null
+++ b/config/bootstrap/log4j2.xml
@@ -0,0 +1,50 @@
+<?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 (%-5p) %m%n"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Logger name="org.apache.directory.fortress.core" level="info"/>
+        <Root level="info">
+            <AppenderRef ref="console"/>
+        </Root>
+    </Loggers>
+
+<!--    <appender name="console" class="org.apache.log4j.ConsoleAppender">-->
+<!--        <layout class="org.apache.log4j.PatternLayout">-->
+<!--            <param name="ConversionPattern" value="%d (%-5p) %m%n"/>-->
+<!--        </layout>-->
+<!--    </appender>-->
+
+<!--    <category name="org.apache.directory.fortress.core" class="org.apache.log4j.Logger" additivity="false">-->
+<!--        <priority value="INFO" class="org.apache.log4j.Level"/>-->
+<!--        <appender-ref ref="console"/>-->
+<!--    </category>-->
+
+
+<!--    <root>-->
+<!--        <priority value="INFO" class="org.apache.log4j.Level"/>-->
+<!--        <appender-ref ref="console"/>-->
+<!--    </root>-->
+
+</Configuration>
diff --git a/config/log4j.xml b/config/log4j.xml
deleted file mode 100755
index 4cc1b1b..0000000
--- a/config/log4j.xml
+++ /dev/null
@@ -1,57 +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 SYSTEM "log4j.dtd">
-<log4j:configuration debug="true" xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-    <appender name="console" class="org.apache.log4j.ConsoleAppender">
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:sss} %-5p %c{1}:%L - %m%n"/>
-        </layout>
-    </appender>
-
-    <appender name="file" class="org.apache.log4j.RollingFileAppender">
-        <param name="append" value="true"/>
-        <param name="maxFileSize" value="10MB"/>
-        <param name="maxBackupIndex" value="10"/>
-        <param name="file" value="fortress.log"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern"
-                   value="%d{yyyy-MM-dd HH:mm:sss} %-5p %c{1}:%L - %m%n"/>
-        </layout>
-    </appender>
-
-    <category name="org.apache.directory.fortress.core" class="org.apache.log4j.Logger" additivity="false">
-        <priority value="INFO" class="org.apache.log4j.Level"/>
-        <appender-ref ref="console"/>
-    </category>
-
-    <!--category name="org.apache.directory.api" class="org.apache.log4j.Logger" additivity="false">
-        <priority value="DEBUG" class="org.apache.log4j.Level"/>
-        <appender-ref ref="console"/>
-    </category-->
-
-    <root>
-        <priority value="INFO" class="org.apache.log4j.Level"/>
-        <appender-ref ref="console"/>
-        <!--<appender-ref ref="file"/>-->
-    </root>
-
-</log4j:configuration>
\ No newline at end of file
diff --git a/config/log4j2.xml b/config/log4j2.xml
new file mode 100755
index 0000000..f7361d4
--- /dev/null
+++ b/config/log4j2.xml
@@ -0,0 +1,70 @@
+<?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>
+        <File name="file" fileName="fortress.log" append="true" maxFileSize="10MB" maxBackupIndex="10">
+            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:sss} %-5p %c{1}:%L - %m%n"/>
+        </File>
+        <Console name="console" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:sss} %-5p %c{1}:%L - %m%n"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Logger name="org.apache.directory.fortress.core" level="info"/>
+        <Root level="info">
+            <AppenderRef ref="console"/>
+        </Root>
+    </Loggers>
+</Configuration>
+
+<!--    <appender name="console" class="org.apache.log4j.ConsoleAppender">-->
+<!--        <layout class="org.apache.log4j.PatternLayout">-->
+<!--            <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:sss} %-5p %c{1}:%L - %m%n"/>-->
+<!--        </layout>-->
+<!--    </appender>-->
+
+<!--    <appender name="file" class="org.apache.log4j.RollingFileAppender">-->
+<!--        <param name="append" value="true"/>-->
+<!--        <param name="maxFileSize" value="10MB"/>-->
+<!--        <param name="maxBackupIndex" value="10"/>-->
+<!--        <param name="file" value="fortress.log"/>-->
+<!--        <layout class="org.apache.log4j.PatternLayout">-->
+<!--            <param name="ConversionPattern"-->
+<!--                   value="%d{yyyy-MM-dd HH:mm:sss} %-5p %c{1}:%L - %m%n"/>-->
+<!--        </layout>-->
+<!--    </appender>-->
+
+<!--    <category name="org.apache.directory.fortress.core" class="org.apache.log4j.Logger" additivity="false">-->
+<!--        <priority value="INFO" class="org.apache.log4j.Level"/>-->
+<!--        <appender-ref ref="console"/>-->
+<!--    </category>-->
+
+    <!--category name="org.apache.directory.api" class="org.apache.log4j.Logger" additivity="false">
+        <priority value="DEBUG" class="org.apache.log4j.Level"/>
+        <appender-ref ref="console"/>
+    </category-->
+
+<!--    <root>-->
+<!--        <priority value="INFO" class="org.apache.log4j.Level"/>-->
+<!--        <appender-ref ref="console"/>-->
+<!--        &lt;!&ndash;<appender-ref ref="file"/>&ndash;&gt;-->
+<!--    </root>-->
+
diff --git a/pom.xml b/pom.xml
index c78d2bf..ad3802c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,11 +121,11 @@
     <version.jmeter.core>2.11</version.jmeter.core>
     <version.jmeter.java>2.11</version.jmeter.java>
     <version.junit>4.12</version.junit>
-    <version.log4j>1.2.17</version.log4j>
+    <version.log4j>2.13.3</version.log4j>
     <version.mina.core>2.0.13</version.mina.core>
     <version.opencsv>2.3</version.opencsv>
     <version.slf4j.api>1.7.29</version.slf4j.api>
-    <version.slf4j.log4j12>1.7.21</version.slf4j.log4j12>
+    <version.slf4j.impl>2.13.3</version.slf4j.impl>
     <version.stax2.api>3.1.1</version.stax2.api>
     <version.woodstox.core.asl>4.2.0</version.woodstox.core.asl>
     <version.xml.apis>1.0b2</version.xml.apis>
@@ -254,9 +254,9 @@
     </dependency>
 
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <version>${version.slf4j.api}</version>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+      <version>${version.slf4j.impl}</version>
     </dependency>
 
     <dependency>
@@ -481,8 +481,14 @@
     </dependency>
 
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+      <version>${version.log4j}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
       <version>${version.log4j}</version>
       <scope>test</scope>
     </dependency>
@@ -720,7 +726,8 @@
                     <pathelement location="${org.apache.ant:ant:jar}" />
                     <pathelement location="${org.openldap:accelerator-api:jar}" />
                     <pathelement location="${org.openldap:accelerator-impl:jar}" />
-                    <pathelement location="${log4j:log4j:jar}" />
+                    <pathelement location="${org.apache.logging.log4j:log4j-api:jar}" />
+                    <pathelement location="${org.apache.logging.log4j:log4j-core:jar}" />
                     <pathelement location="${org.apache.directory.api:api-all:jar}" />
                     <pathelement location="${org.apache.mina:mina-core:jar}" />
                     <pathelement location="${org.jgrapht:jgrapht-core:jar}" />
@@ -733,7 +740,7 @@
                     <pathelement location="${commons-pool:commons-pool:jar}" />
                     <pathelement location="${net.sf.ehcache:ehcache-core:jar}" />
                     <pathelement location="${org.slf4j:slf4j-api:jar}" />
-                    <pathelement location="${org.slf4j:slf4j-log4j12:jar}" />
+                    <pathelement location="${org.apache.logging.log4j:log4j-slf4j-impl:jar}" />
                     <pathelement location="${antlr:antlr:jar}" />
                     <pathelement location="${javax.ws.rs:javax.ws.rs-api:jar}" />
                     <pathelement location="${org.apache.httpcomponents:httpclient:jar}" />
@@ -881,8 +888,13 @@
             </executions>
             <dependencies>
               <dependency>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-api</artifactId>
+                <version>${version.log4j}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-core</artifactId>
                 <version>${version.log4j}</version>
               </dependency>
               <dependency>
@@ -935,8 +947,13 @@
             </executions>
             <dependencies>
               <dependency>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-api</artifactId>
+                <version>${version.log4j}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-core</artifactId>
                 <version>${version.log4j}</version>
               </dependency>
               <dependency>
@@ -1047,8 +1064,13 @@
             </executions>
             <dependencies>
               <dependency>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-api</artifactId>
+                <version>${version.log4j}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-core</artifactId>
                 <version>${version.log4j}</version>
               </dependency>
               <dependency>
@@ -1103,8 +1125,13 @@
             </executions>
             <dependencies>
               <dependency>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-api</artifactId>
+                <version>${version.log4j}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-core</artifactId>
                 <version>${version.log4j}</version>
               </dependency>
               <dependency>
@@ -1157,8 +1184,13 @@
             </executions>
             <dependencies>
               <dependency>
-                <groupId>log4j</groupId>
-                <artifactId>log4j</artifactId>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-api</artifactId>
+                <version>${version.log4j}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.logging.log4j</groupId>
+                <artifactId>log4j-core</artifactId>
                 <version>${version.log4j}</version>
               </dependency>
               <dependency>
diff --git a/src/test/resources/log4j.xml b/src/test/resources/log4j.xml
deleted file mode 100755
index cc535c6..0000000
--- a/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,57 +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 SYSTEM "log4j.dtd">
-<log4j:configuration debug="false" xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-
-    <appender name="file" class="org.apache.log4j.FileAppender">
-        <param name="File" value="fortress.log"/>
-        <param name="Append" value="true"/>
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="%t %-5p %c{2} - %m%n"/>
-        </layout>
-    </appender>
-
-    <appender name="console" class="org.apache.log4j.ConsoleAppender">
-        <layout class="org.apache.log4j.PatternLayout">
-            <param name="ConversionPattern" value="%d (%-5p) %m%n"/>
-        </layout>
-    </appender>
-
-    <!-- Uncomment to store REST log statements to file:
-        <category name="org.apache.directory.fortress.rest.RestUtils" class="org.apache.log4j.Logger" additivity="false">
-            <priority value="INFO" class="org.apache.log4j.Level"/>
-            <appender-ref ref="file"/>
-        </category>
-    -->
-
-    <category name="org.apache.directory.fortress.example" class="org.apache.log4j.Logger" additivity="false">
-        <priority value="DEBUG" class="org.apache.log4j.Level"/>
-        <appender-ref ref="console"/>
-    </category>
-
-    <root>
-        <priority value="WARN" class="org.apache.log4j.Level"/>
-        <appender-ref ref="console"/>
-    </root>
-
-</log4j:configuration>
-
-
diff --git a/src/test/resources/log4j2.xml b/src/test/resources/log4j2.xml
new file mode 100755
index 0000000..83a4cba
--- /dev/null
+++ b/src/test/resources/log4j2.xml
@@ -0,0 +1,69 @@
+<?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>
+        <File name="file" fileName="fortress.log" append="true">
+            <PatternLayout pattern="%t %-5p %c{2} - %m%n"/>
+        </File>
+        <Console name="console" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d (%-5p) %m%n"/>
+        </Console>
+    </Appenders>
+    <Loggers>
+        <Logger name="org.apache.directory.fortress.example" level="debug"/>
+        <Root level="warn">
+            <AppenderRef ref="console"/>
+        </Root>
+    </Loggers>
+</Configuration>
+
+
+<!--    <appender name="file" class="org.apache.log4j.FileAppender">-->
+<!--        <param name="File" value="fortress.log"/>-->
+<!--        <param name="Append" value="true"/>-->
+<!--        <layout class="org.apache.log4j.PatternLayout">-->
+<!--            <param name="ConversionPattern" value="%t %-5p %c{2} - %m%n"/>-->
+<!--        </layout>-->
+<!--    </appender>-->
+
+<!--    <appender name="console" class="org.apache.log4j.ConsoleAppender">-->
+<!--        <layout class="org.apache.log4j.PatternLayout">-->
+<!--            <param name="ConversionPattern" value="%d (%-5p) %m%n"/>-->
+<!--        </layout>-->
+<!--    </appender>-->
+
+    <!-- Uncomment to store REST log statements to file:
+        <category name="org.apache.directory.fortress.rest.RestUtils" class="org.apache.log4j.Logger" additivity="false">
+            <priority value="INFO" class="org.apache.log4j.Level"/>
+            <appender-ref ref="file"/>
+        </category>
+    -->
+
+<!--    <category name="org.apache.directory.fortress.example" class="org.apache.log4j.Logger" additivity="false">-->
+<!--        <priority value="DEBUG" class="org.apache.log4j.Level"/>-->
+<!--        <appender-ref ref="console"/>-->
+<!--    </category>-->
+
+<!--    <root>-->
+<!--        <priority value="WARN" class="org.apache.log4j.Level"/>-->
+<!--        <appender-ref ref="console"/>-->
+<!--    </root>-->
+
+