diff gwt-client/src/main/java/org/dive4elements/river/client/server/BaseServletContextListener.java @ 9724:654aaa0d7576 3.2.x

Rely on log4j's default initialization procedure This should make upgrading to Log4j 2.x easier. In passing, use latest Log4j 1.
author Tom Gottfried <tom@intevation.de>
date Fri, 25 Feb 2022 17:13:49 +0100
parents 5e38e2924c07
children 0a5239a1e46e
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/BaseServletContextListener.java	Fri Feb 25 14:39:26 2022 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/BaseServletContextListener.java	Fri Feb 25 17:13:49 2022 +0100
@@ -25,8 +25,6 @@
  */
 public class BaseServletContextListener implements ServletContextListener {
 
-    public static final String LOG4J_PROPERTIES = "FLYS_CLIENT_LOG4J_PROPERIES";
-
     public static final Logger log = Logger.getLogger(
         BaseServletContextListener.class);
 
@@ -34,8 +32,6 @@
     public void  contextInitialized(ServletContextEvent sce) {
         ServletContext sc = sce.getServletContext();
 
-        this.initLogging(sc);
-
         String filename = sc.getInitParameter("features-file");
 
         log.debug("Initializing ServletContext");
@@ -52,20 +48,4 @@
     public void contextDestroyed(ServletContextEvent sce) {
         //DO NOTHING
     }
-
-
-    private void initLogging(ServletContext sc) {
-        String log4jProperties = System.getenv(LOG4J_PROPERTIES);
-
-        if (log4jProperties == null || log4jProperties.length() == 0) {
-            String file = sc.getInitParameter("log4j-properties");
-
-            if (file != null && file.length() > 0) {
-                log4jProperties = sc.getRealPath(file);
-            }
-        }
-        System.out.println(log4jProperties);
-
-        LoggingConfigurator.init(log4jProperties);
-    }
 }

http://dive4elements.wald.intevation.org