User: ejort Date: 02/01/04 22:39:41 Modified: catalina/src/main/org/jboss/web EmbeddedCatalinaServiceSX.java Log: Guarded debug logging Revision Changes Path 1.2 +11 -5 contrib/catalina/src/main/org/jboss/web/EmbeddedCatalinaServiceSX.java Index: EmbeddedCatalinaServiceSX.java =================================================================== RCS file: /cvsroot/jboss/contrib/catalina/src/main/org/jboss/web/EmbeddedCatalinaServiceSX.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- EmbeddedCatalinaServiceSX.java 2001/12/12 02:27:14 1.1 +++ EmbeddedCatalinaServiceSX.java 2002/01/05 06:39:41 1.2 @@ -69,7 +69,7 @@ @see org.apache.catalina.startup.Embedded @author [EMAIL PROTECTED] - @version $Revision: 1.1 $ + @version $Revision: 1.2 $ */ public class EmbeddedCatalinaServiceSX extends AbstractWebContainer implements EmbeddedCatalinaServiceSXMBean { @@ -210,6 +210,8 @@ public void startService() throws Exception { + debug = log.isDebugEnabled(); + log.info("Starting " + NAME + "...."); // Start create the embeded catalina container but don't let it overwrite the thread class loader @@ -228,7 +230,8 @@ debugLevel = 0; if( log.isTraceEnabled() ) debugLevel = 2; - log.debug("Setting catalina debug level to: "+debugLevel); + if (debug) + log.debug("Setting catalina debug level to: "+debugLevel); try { @@ -238,7 +241,8 @@ String homePath = catalinaHome.getFile(); File homeDir = new File(homePath, "../../.."); homePath = homeDir.getCanonicalPath(); - log.debug("Setting catalina.home to: " + homePath); + if (debug) + log.debug("Setting catalina.home to: " + homePath); System.setProperty("catalina.home", homePath); System.setProperty("catalina.base", homePath); initCatalina(cl); @@ -280,7 +284,8 @@ URL url = new URL(warUrl); WebApplication appInfo = createWebContext(ctxPath, url, webAppParser); - log.debug("Initialized: "+appInfo); + if (log.isDebugEnabled()) + log.debug("Initialized: "+appInfo); return appInfo; } @@ -416,7 +421,8 @@ Object source = event.getSource(); if( source == context && event.getType().equals(Lifecycle.START_EVENT) ) { - log.debug("Context.lifecycleEvent, event="+event); + if (log.isDebugEnabled()) + log.debug("Context.lifecycleEvent, event="+event); contextInit(context, appInfo, webAppParser); } }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development