Author: markt
Date: Tue Sep 15 10:38:23 2009
New Revision: 815264

URL: http://svn.apache.org/viewvc?rev=815264&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47828
Change Tomcat.setSilent() to setSilent(boolean) so it can be turned on and off

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=815264&r1=815263&r2=815264&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Tue Sep 15 
10:38:23 2009
@@ -543,13 +543,20 @@
     };
     
     /**
-     * Sets the log level to WARN for the loggers that log information on
-     * Tomcat start up. This prevents the usual startup information being
-     * logged to the console.
+     * Controls if the loggers will be silenced or not.
+     * @param silent    <code>true</code> sets the log level to WARN for the
+     *                  loggers that log information on Tomcat start up. This
+     *                  prevents the usual startup information being logged.
+     *                  <code>false</code> sets the log level to the default
+     *                  level of INFO.
      */
-    public void setSilent() {
+    public void setSilent(boolean silent) {
         for (String s : silences) {
-            Logger.getLogger(s).setLevel(Level.WARNING);
+            if (silent) {
+                Logger.getLogger(s).setLevel(Level.WARNING);
+            } else {
+                Logger.getLogger(s).setLevel(Level.INFO);
+            }
         }
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to