diff --git a/log4j.properties b/log4j.properties
new file mode 100644
index 0000000..9c142f3
--- /dev/null
+++ b/log4j.properties
@@ -0,0 +1,13 @@
+# Log configuration
+# #################
+
+# priority setting: DEBUG < INFO < WARN < ERROR
+log4j.rootLogger = INFO, console
+log4j.logger.eu.libreservice.www = INFO
+log4j.logger.fr.devinsy.xidyn = WARN
+
+#--
+log4j.appender.console = org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout = org.apache.log4j.PatternLayout
+#log4j.appender.console.layout.ConversionPattern = %d{ISO8601} - LibreServiceEuWeb [%-5p] %34.34c.%25M - %m%n
+log4j.appender.console.layout.ConversionPattern = %m%n
diff --git a/src/website/services/AudioPage.java b/src/website/services/AudioPage.java
index c6ed1f4..d697707 100644
--- a/src/website/services/AudioPage.java
+++ b/src/website/services/AudioPage.java
@@ -47,7 +47,6 @@ public class AudioPage extends HttpServlet
@Override
public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException
{
- logger.debug("Htmlize about page.");
try
{
// Get parameters.
@@ -72,8 +71,6 @@ public class AudioPage extends HttpServlet
{
ErrorView.show(request, response, "Error", exception.getMessage(), null);
}
-
- logger.debug("doGet done.");
}
/* (non-Javadoc)
diff --git a/test/eu/libreservice/www/LibreServiceEuTest.java b/test/eu/libreservice/www/LibreServiceEuTest.java
index 378724c..d9e4514 100644
--- a/test/eu/libreservice/www/LibreServiceEuTest.java
+++ b/test/eu/libreservice/www/LibreServiceEuTest.java
@@ -18,15 +18,13 @@
*/
package eu.libreservice.www;
-import org.apache.log4j.BasicConfigurator;
-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.apache.logging.log4j.core.config.DefaultConfiguration;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-import eu.libreservice.www.LibreServiceEuWebException;
-
/**
* The Class JugaTest.
*
@@ -66,7 +64,7 @@ public class LibreServiceEuTest
@BeforeClass
public static void beforeClass() throws LibreServiceEuWebException
{
- BasicConfigurator.configure();
- Logger.getRootLogger().setLevel(Level.DEBUG);
+ Configurator.initialize(new DefaultConfiguration());
+ Configurator.setRootLevel(Level.DEBUG);
}
}
diff --git a/webapp/META-INF/context.xml b/webapp/META-INF/context.xml
index 85dfb64..f0c910f 100644
--- a/webapp/META-INF/context.xml
+++ b/webapp/META-INF/context.xml
@@ -49,7 +49,7 @@
-
+
diff --git a/webapp/WEB-INF/lib/Logs/log4j-1.2.17-source.zip b/webapp/WEB-INF/lib/Logs/log4j-1.2.17-source.zip
deleted file mode 100644
index 2a9a7f4..0000000
Binary files a/webapp/WEB-INF/lib/Logs/log4j-1.2.17-source.zip and /dev/null differ
diff --git a/webapp/WEB-INF/lib/Logs/log4j-1.2.17.jar b/webapp/WEB-INF/lib/Logs/log4j-1.2.17.jar
deleted file mode 100644
index 068867e..0000000
Binary files a/webapp/WEB-INF/lib/Logs/log4j-1.2.17.jar and /dev/null differ
diff --git a/webapp/WEB-INF/lib/Logs/slf4j-api-1.7.25.jar b/webapp/WEB-INF/lib/Logs/slf4j-api-1.7.25.jar
deleted file mode 100644
index 7e62f13..0000000
Binary files a/webapp/WEB-INF/lib/Logs/slf4j-api-1.7.25.jar and /dev/null differ
diff --git a/webapp/WEB-INF/lib/Logs/slf4j-log4j12-1.7.25-sources.jar b/webapp/WEB-INF/lib/Logs/slf4j-log4j12-1.7.25-sources.jar
deleted file mode 100644
index 0cd5be7..0000000
Binary files a/webapp/WEB-INF/lib/Logs/slf4j-log4j12-1.7.25-sources.jar and /dev/null differ
diff --git a/webapp/WEB-INF/lib/Logs/slf4j-log4j12-1.7.25.jar b/webapp/WEB-INF/lib/Logs/slf4j-log4j12-1.7.25.jar
deleted file mode 100644
index 4a44e06..0000000
Binary files a/webapp/WEB-INF/lib/Logs/slf4j-log4j12-1.7.25.jar and /dev/null differ
diff --git a/webapp/WEB-INF/lib/log4j-1.2.17-source.zip b/webapp/WEB-INF/lib/log4j-1.2.17-source.zip
deleted file mode 100644
index 2a9a7f4..0000000
Binary files a/webapp/WEB-INF/lib/log4j-1.2.17-source.zip and /dev/null differ
diff --git a/webapp/WEB-INF/lib/log4j-1.2.17.jar b/webapp/WEB-INF/lib/log4j-1.2.17.jar
deleted file mode 100644
index 068867e..0000000
Binary files a/webapp/WEB-INF/lib/log4j-1.2.17.jar and /dev/null differ
diff --git a/webapp/WEB-INF/lib/log4j-api-2.17.0-sources.jar b/webapp/WEB-INF/lib/log4j-api-2.17.0-sources.jar
new file mode 100644
index 0000000..f895ea8
Binary files /dev/null and b/webapp/WEB-INF/lib/log4j-api-2.17.0-sources.jar differ
diff --git a/webapp/WEB-INF/lib/log4j-api-2.17.0.jar b/webapp/WEB-INF/lib/log4j-api-2.17.0.jar
new file mode 100644
index 0000000..77af535
Binary files /dev/null and b/webapp/WEB-INF/lib/log4j-api-2.17.0.jar differ
diff --git a/webapp/WEB-INF/lib/log4j-core-2.17.0-sources.jar b/webapp/WEB-INF/lib/log4j-core-2.17.0-sources.jar
new file mode 100644
index 0000000..6d0e47a
Binary files /dev/null and b/webapp/WEB-INF/lib/log4j-core-2.17.0-sources.jar differ
diff --git a/webapp/WEB-INF/lib/log4j-core-2.17.0.jar b/webapp/WEB-INF/lib/log4j-core-2.17.0.jar
new file mode 100644
index 0000000..256ff3d
Binary files /dev/null and b/webapp/WEB-INF/lib/log4j-core-2.17.0.jar differ
diff --git a/webapp/WEB-INF/lib/log4j-slf4j-impl-2.17.0-sources.jar b/webapp/WEB-INF/lib/log4j-slf4j-impl-2.17.0-sources.jar
new file mode 100644
index 0000000..490e97e
Binary files /dev/null and b/webapp/WEB-INF/lib/log4j-slf4j-impl-2.17.0-sources.jar differ
diff --git a/webapp/WEB-INF/lib/log4j-slf4j-impl-2.17.0.jar b/webapp/WEB-INF/lib/log4j-slf4j-impl-2.17.0.jar
new file mode 100644
index 0000000..6501d11
Binary files /dev/null and b/webapp/WEB-INF/lib/log4j-slf4j-impl-2.17.0.jar differ
diff --git a/webapp/WEB-INF/lib/Logs/slf4j-api-1.7.25-sources.jar b/webapp/WEB-INF/lib/slf4j-api-1.7.32-sources.jar
similarity index 65%
rename from webapp/WEB-INF/lib/Logs/slf4j-api-1.7.25-sources.jar
rename to webapp/WEB-INF/lib/slf4j-api-1.7.32-sources.jar
index b2a3d83..e8c4f52 100644
Binary files a/webapp/WEB-INF/lib/Logs/slf4j-api-1.7.25-sources.jar and b/webapp/WEB-INF/lib/slf4j-api-1.7.32-sources.jar differ
diff --git a/webapp/WEB-INF/lib/slf4j-api-1.7.32.jar b/webapp/WEB-INF/lib/slf4j-api-1.7.32.jar
new file mode 100644
index 0000000..b16a078
Binary files /dev/null and b/webapp/WEB-INF/lib/slf4j-api-1.7.32.jar differ
diff --git a/webapp/WEB-INF/lib/slf4j-api-1.7.5-sources.jar b/webapp/WEB-INF/lib/slf4j-api-1.7.5-sources.jar
deleted file mode 100644
index 51abe2b..0000000
Binary files a/webapp/WEB-INF/lib/slf4j-api-1.7.5-sources.jar and /dev/null differ
diff --git a/webapp/WEB-INF/lib/slf4j-api-1.7.5.jar b/webapp/WEB-INF/lib/slf4j-api-1.7.5.jar
deleted file mode 100644
index 8766455..0000000
Binary files a/webapp/WEB-INF/lib/slf4j-api-1.7.5.jar and /dev/null differ
diff --git a/webapp/WEB-INF/lib/slf4j-log4j12-1.7.5-sources.jar b/webapp/WEB-INF/lib/slf4j-log4j12-1.7.5-sources.jar
deleted file mode 100644
index ea1b93b..0000000
Binary files a/webapp/WEB-INF/lib/slf4j-log4j12-1.7.5-sources.jar and /dev/null differ
diff --git a/webapp/WEB-INF/lib/slf4j-log4j12-1.7.5.jar b/webapp/WEB-INF/lib/slf4j-log4j12-1.7.5.jar
deleted file mode 100644
index afce5c2..0000000
Binary files a/webapp/WEB-INF/lib/slf4j-log4j12-1.7.5.jar and /dev/null differ
diff --git a/webapp/WEB-INF/log4j.properties b/webapp/WEB-INF/log4j.properties
deleted file mode 100644
index 9f0ab64..0000000
--- a/webapp/WEB-INF/log4j.properties
+++ /dev/null
@@ -1,26 +0,0 @@
-# Log information (priority setting : DEBUG < INFO < WARN < ERROR)
-# ################
-log4j.rootLogger = INFO, CONSOLE
-
-log4j.logger.fr.devinsy.kiss4web = DEBUG
-log4j.logger.fr.devinsy.xidyn = INFO
-log4j.logger.fr.devinsy.xidyn.Presenter = INFO
-log4j.logger.fr.devinsy.xidyn.FilePresenter = DEBUG
-log4j.logger.eu.libreservice.www = DEBUG
-
-
-#--
-log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-log4j.appender.CONSOLE.layout.ConversionPattern = %d{ISO8601} - LibreServiceEuWeb [%-5p] %34.34c.%25M %t - %m%n
-
-
-#--
-log4j.appender.LibreServiceEUWeb-Writer = org.apache.log4j.RollingFileAppender
-log4j.appender.LibreServiceEUWeb-Writer.File = /services/LibreServiceEuWeb/libreserviceeuweb.log
-log4j.appender.LibreServiceEUWeb-Writer.MaxFileSize = 100000KB
-log4j.appender.LibreServiceEUWeb-Writer.MaxBackupIndex = 100
-log4j.appender.LibreServiceEUWeb-Writer.layout = org.apache.log4j.PatternLayout
-log4j.appender.LibreServiceEUWeb-Writer.layout.ConversionPattern = %d{ISO8601} - LibreServiceEuWeb [%-5p] %-50c.%30M - %m%n
-
-
diff --git a/webapp/WEB-INF/log4j2.properties b/webapp/WEB-INF/log4j2.properties
new file mode 100644
index 0000000..557dd02
--- /dev/null
+++ b/webapp/WEB-INF/log4j2.properties
@@ -0,0 +1,80 @@
+# Log information (priority setting : DEBUG < INFO < WARN < ERROR)
+# ################
+dest = err
+name = Log4j2PropertiesConfig
+status = TRACE
+
+# Appenders settings.
+appenders = console, logfile
+
+appender.console.type = Console
+appender.console.name = LogToConsole
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{ISO8601} - LibreServiceEuWeb [%-5p] %34.34c.%25M %t - %m%n
+
+appender.logfile.type = RollingFile
+appender.logfile.name = LibreServiceEUWeb
+appender.logfile.fileName = /srv/www.libre-service.eu/libreserviceeuweb.log
+appender.logfile.filePattern = /srv/www.libre-service.eu/libreserviceeuweb-%i.log.gz
+appender.logfile.layout.type = PatternLayout
+appender.logfile.layout.pattern = %d{ISO8601} - LibreServiceEuWeb [%-5p] %-50c.%30M - %m%n
+appender.logfile.policies.type = Policies
+appender.logfile.policies.size.type = SizeBasedTriggeringPolicy
+appender.logfile.policies.size.size=10MB
+appender.logfile.strategy.type = DefaultRolloverStrategy
+appender.logfile.strategy.max = 5
+
+# Logger settings.
+rootLogger.level = DEBUG
+rootLogger.appenderRefs = a, b
+rootLogger.appenderRef.a.ref = LogToConsole
+rootLogger.appenderRef.b.ref = LibreServiceEUWeb
+
+logger.kiss4web.name = fr.devinsy.kiss4web
+logger.kiss4web.level = DEBUG
+
+logger.xidyn.name = fr.devinsy.xidyn
+logger.xidyn.level = INFO
+
+logger.xidyn2.name = fr.devinsy.xidyn.FilePresenter
+logger.xidyn2.level = DEBUG
+
+
+
+#property.filename = target/rolling/rollingtest.log
+#
+#filter.threshold.type = ThresholdFilter
+#filter.threshold.level = DEBUG
+#
+#appender.console.type = Console
+#appender.console.name = STDOUT
+#appender.console.layout.type = PatternLayout
+#appender.console.layout.pattern = %d{ISO8601} - LibreServiceEuWeb [%-5p] %34.34c.%25M %t - %m%n
+#appender.console.filter.threshold.type = ThresholdFilter
+#appender.console.filter.threshold.level = DEBUG
+#
+##--
+#appender.logfile.type = RollingFile
+#appender.logfile.name = LibreServiceEUWeb
+#appender.rolling.fileName = /services/LibreServiceEuWeb/libreserviceeuweb.log
+#appender.rolling.layout.type = PatternLayout
+#appender.rolling.layout.pattern = %d{ISO8601} - LibreServiceEuWeb [%-5p] %-50c.%30M - %m%n
+#appender.rolling.policies.type = Policies
+#appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
+#appender.rolling.policies.time.interval = 2
+#appender.rolling.policies.time.modulate = true
+#appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
+#appender.rolling.policies.size.size=100MB
+#appender.rolling.strategy.type = DefaultRolloverStrategy
+#appender.rolling.strategy.max = 5
+#
+#logger.console.name = fr.devinsy.kiss4web
+#logger.console.level = DEBUG
+#logger.console.additivity = false
+#logger.console.appenderRef.console.ref = Console
+#
+#logger.console.name = eu.libreservice.www
+#logger.console.level = DEBUG
+#
+#rootLogger.level = DEBUG
+#rootLogger.appenderRef.stdout.ref = STDOUT