From 1da1cadfe51b9fc9970091e0d2ee6bedbcfd859b Mon Sep 17 00:00:00 2001 From: ulrich <ulrich@uhilger.de> Date: Sun, 16 Nov 2014 18:55:13 +0000 Subject: [PATCH] AbstractServlet eingebaut --- src/de/uhilger/transit/web/WebApp.java | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/de/uhilger/transit/web/WebApp.java b/src/de/uhilger/transit/web/WebApp.java index f00d841..4787c8f 100644 --- a/src/de/uhilger/transit/web/WebApp.java +++ b/src/de/uhilger/transit/web/WebApp.java @@ -41,17 +41,18 @@ */ public class WebApp implements ServletContextListener { - public static final String P_LOGGERNAME = "loggername"; + /*public static final String P_LOGGERNAME = "loggername"; public static final String P_LOGDIRNAME = "logdirname"; public static final String P_LOGFILENAME = "logfilename"; public static final String P_LOGFILESIZE = "logfilesize"; public static final String P_LOGFILECOUNT = "logfilecount"; - public static final String P_LOGLEVEL = "loglevel"; + public static final String P_LOGLEVEL = "loglevel";*/ public static final String P_DEBUG = "debug"; public static final String WEBAPP_LOGGER = "webapplogger"; + /* private Level getLevel(String levelStr) { Level level = Level.INFO; if(levelStr.equalsIgnoreCase(Level.ALL.getName())) { @@ -73,10 +74,12 @@ } return level; } - + */ public void contextInitialized(ServletContextEvent event) { ServletContext servletContext = event.getServletContext(); + /* Object o = servletContext.getAttribute(WEBAPP_LOGGER); + if(o == null) { String loggername = servletContext.getInitParameter(P_LOGGERNAME); // Name der root Package dieser Anwendung String logdirname = servletContext.getInitParameter(P_LOGDIRNAME); @@ -107,10 +110,12 @@ } else { // logger ist schon da } + */ } public void contextDestroyed(ServletContextEvent event) { ServletContext servletContext = event.getServletContext(); + /* Object o = servletContext.getAttribute(WEBAPP_LOGGER); if(o != null) { Logger logger = (Logger) o; @@ -125,6 +130,7 @@ servletContext.removeAttribute(WEBAPP_LOGGER); logger = null; } + */ } /** -- Gitblit v1.9.3