diff --git a/.classpath b/.classpath
index 603df75..901828c 100644
--- a/.classpath
+++ b/.classpath
@@ -12,9 +12,6 @@
-
-
-
@@ -26,5 +23,9 @@
+
+
+
+
diff --git a/lib/Logs/log4j-1.2.17-source.zip b/lib/Logs/log4j-1.2.17-source.zip
deleted file mode 100644
index 2a9a7f4..0000000
Binary files a/lib/Logs/log4j-1.2.17-source.zip and /dev/null differ
diff --git a/lib/Logs/log4j-1.2.17.jar b/lib/Logs/log4j-1.2.17.jar
deleted file mode 100644
index 068867e..0000000
Binary files a/lib/Logs/log4j-1.2.17.jar and /dev/null differ
diff --git a/lib/Logs/log4j-api-2.17.0-sources.jar b/lib/Logs/log4j-api-2.17.0-sources.jar
new file mode 100644
index 0000000..f895ea8
Binary files /dev/null and b/lib/Logs/log4j-api-2.17.0-sources.jar differ
diff --git a/lib/Logs/log4j-api-2.17.0.jar b/lib/Logs/log4j-api-2.17.0.jar
new file mode 100644
index 0000000..77af535
Binary files /dev/null and b/lib/Logs/log4j-api-2.17.0.jar differ
diff --git a/lib/Logs/log4j-core-2.17.0-sources.jar b/lib/Logs/log4j-core-2.17.0-sources.jar
new file mode 100644
index 0000000..6d0e47a
Binary files /dev/null and b/lib/Logs/log4j-core-2.17.0-sources.jar differ
diff --git a/lib/Logs/log4j-core-2.17.0.jar b/lib/Logs/log4j-core-2.17.0.jar
new file mode 100644
index 0000000..256ff3d
Binary files /dev/null and b/lib/Logs/log4j-core-2.17.0.jar differ
diff --git a/lib/Logs/log4j-slf4j-impl-2.17.0-sources.jar b/lib/Logs/log4j-slf4j-impl-2.17.0-sources.jar
new file mode 100644
index 0000000..490e97e
Binary files /dev/null and b/lib/Logs/log4j-slf4j-impl-2.17.0-sources.jar differ
diff --git a/lib/Logs/log4j-slf4j-impl-2.17.0.jar b/lib/Logs/log4j-slf4j-impl-2.17.0.jar
new file mode 100644
index 0000000..6501d11
Binary files /dev/null and b/lib/Logs/log4j-slf4j-impl-2.17.0.jar differ
diff --git a/lib/Logs/slf4j-api-1.7.32-sources.jar b/lib/Logs/slf4j-api-1.7.32-sources.jar
new file mode 100644
index 0000000..e8c4f52
Binary files /dev/null and b/lib/Logs/slf4j-api-1.7.32-sources.jar differ
diff --git a/lib/Logs/slf4j-api-1.7.32.jar b/lib/Logs/slf4j-api-1.7.32.jar
new file mode 100644
index 0000000..b16a078
Binary files /dev/null and b/lib/Logs/slf4j-api-1.7.32.jar differ
diff --git a/lib/Logs/slf4j-api-1.7.5-sources.jar b/lib/Logs/slf4j-api-1.7.5-sources.jar
deleted file mode 100644
index 51abe2b..0000000
Binary files a/lib/Logs/slf4j-api-1.7.5-sources.jar and /dev/null differ
diff --git a/lib/Logs/slf4j-api-1.7.5.jar b/lib/Logs/slf4j-api-1.7.5.jar
deleted file mode 100644
index 8766455..0000000
Binary files a/lib/Logs/slf4j-api-1.7.5.jar and /dev/null differ
diff --git a/lib/Logs/slf4j-log4j12-1.7.5-sources.jar b/lib/Logs/slf4j-log4j12-1.7.5-sources.jar
deleted file mode 100644
index ea1b93b..0000000
Binary files a/lib/Logs/slf4j-log4j12-1.7.5-sources.jar and /dev/null differ
diff --git a/lib/Logs/slf4j-log4j12-1.7.5.jar b/lib/Logs/slf4j-log4j12-1.7.5.jar
deleted file mode 100644
index afce5c2..0000000
Binary files a/lib/Logs/slf4j-log4j12-1.7.5.jar and /dev/null differ
diff --git a/src/fr/devinsy/kiss4web/Kiss4webLauncher.java b/src/fr/devinsy/kiss4web/Kiss4webLauncher.java
index 6e00eb4..755fa81 100644
--- a/src/fr/devinsy/kiss4web/Kiss4webLauncher.java
+++ b/src/fr/devinsy/kiss4web/Kiss4webLauncher.java
@@ -25,6 +25,8 @@ import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.DefaultConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -64,7 +66,7 @@ public class Kiss4webLauncher implements javax.servlet.ServletContextListener
if (StringUtils.isBlank(logFilePathname))
{
- org.apache.log4j.BasicConfigurator.configure();
+ Configurator.initialize(new DefaultConfiguration());
logger.warn("Log configuration undefined, use of the basic configurator.");
}
else
@@ -79,12 +81,12 @@ public class Kiss4webLauncher implements javax.servlet.ServletContextListener
if (new File(logFilePathname).exists())
{
- org.apache.log4j.PropertyConfigurator.configure(logFilePathname);
+ Configurator.initialize(null, logFilePathname);
}
else
{
System.out.println("Log configuration FILE NOT FOUND (" + logFilePathname + "), use of the basic configurator.");
- org.apache.log4j.BasicConfigurator.configure();
+ Configurator.initialize(new DefaultConfiguration());
}
logger = LoggerFactory.getLogger(this.getClass());
diff --git a/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherUtils.java b/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherUtils.java
index f504a6d..d442997 100644
--- a/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherUtils.java
+++ b/src/fr/devinsy/kiss4web/dispatcher/KissDispatcherUtils.java
@@ -225,7 +225,7 @@ public class KissDispatcherUtils
if (servletClass == null)
{
result = null;
- logger.error("unknown page: [{}]", classPathname);
+ logger.warn("unknown page: [{}]", classPathname);
}
else
{
diff --git a/test/FooSandbox.java b/test/FooSandbox.java
index b6b061b..953d3f0 100644
--- a/test/FooSandbox.java
+++ b/test/FooSandbox.java
@@ -17,6 +17,11 @@
* You should have received a copy of the GNU Lesser General Public License
* along with Kiss4web. If not, see
*/
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.DefaultConfiguration;
+
import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
/**
@@ -24,18 +29,15 @@ import fr.devinsy.kiss4web.dispatcher.KissDispatcherUtils;
*/
public class FooSandbox
{
- private static org.apache.log4j.Logger logger;
+ private static org.apache.logging.log4j.Logger logger;
static
{
// Initialize logger.
- org.apache.log4j.Logger logger = null;
+ org.apache.logging.log4j.Logger logger = null;
- org.apache.log4j.BasicConfigurator.configure();
-
- logger = org.apache.log4j.Logger.getRootLogger();
- // logger.setLevel (org.apache.log4j.Level.INFO);
- logger.setLevel(org.apache.log4j.Level.INFO);
+ Configurator.initialize(new DefaultConfiguration());
+ Configurator.setRootLevel(Level.INFO);
logger.info("Enter");
@@ -47,7 +49,7 @@ public class FooSandbox
logger.info("... done.");
logger.debug("Exit");
- logger = org.apache.log4j.Logger.getLogger(FooSandbox.class.getName());
+ logger = LogManager.getLogger(FooSandbox.class.getName());
}
/**