Use string manager for log messages
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 12 Jan 2010 18:23:27 +0000 (18:23 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 12 Jan 2010 18:23:27 +0000 (18:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@898456 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/manager/host/HostManagerServlet.java
java/org/apache/catalina/manager/host/LocalStrings.properties

index b4ba715..1d633dd 100644 (file)
@@ -346,7 +346,7 @@ public class HostManagerServlet
          boolean xmlNamespaceAware,
          boolean xmlValidation) {
         if (debug >= 1) {
-            log("add: Adding host '" + name + "'");
+            log(sm.getString("hostManagerServlet.add", name));
         }
 
         // Validate the requested host name
@@ -470,7 +470,7 @@ public class HostManagerServlet
     protected synchronized void remove(PrintWriter writer, String name) {
 
         if (debug >= 1) {
-            log("remove: Removing host '" + name + "'");
+            log(sm.getString("hostManagerServlet.remove", name));
         }
 
         // Validate the requested host name
@@ -523,9 +523,9 @@ public class HostManagerServlet
      */
     protected void list(PrintWriter writer) {
 
-        if (debug >= 1)
-            log("list: Listing hosts for engine '" 
-                + engine.getName() + "'");
+        if (debug >= 1) {
+            log(sm.getString("hostManagerServlet.list", engine.getName()));
+        }
 
         writer.println(sm.getString("hostManagerServlet.listed",
                                     engine.getName()));
@@ -555,8 +555,9 @@ public class HostManagerServlet
      */
     protected void start(PrintWriter writer, String name) {
 
-        if (debug >= 1)
-            log("start: Starting host with name '" + name + "'");
+        if (debug >= 1) {
+            log(sm.getString("hostManagerServlet.start", name));
+        }
 
         // Validate the requested host name
         if ((name == null) || name.length() == 0) {
@@ -604,8 +605,9 @@ public class HostManagerServlet
      */
     protected void stop(PrintWriter writer, String name) {
 
-        if (debug >= 1)
-            log("stop: Stopping host with name '" + name + "'");
+        if (debug >= 1) {
+            log(sm.getString("hostManagerServlet.stop", name));
+        }
 
         // Validate the requested host name
         if ((name == null) || name.length() == 0) {
index b60ddfb..df89f24 100644 (file)
@@ -35,6 +35,11 @@ hostManagerServlet.startFailed=FAIL - Failed to start host {0}
 hostManagerServlet.cannotStopOwnHost=FAIL - Cannot stop own host {0}
 hostManagerServlet.stopped=OK - Host {0} stopped
 hostManagerServlet.stopFailed=FAIL - Failed to stop host {0}
+hostManagerServlet.add=add: Adding host [{0}]
+hostManagerServlet.remove=remove: Removing host [{0}]
+hostManagerServlet.list=list: Listing hosts for engine [{0}]
+hostManagerServlet.start=start: Starting host with name [{0}]
+hostManagerServlet.stop=stop: Stopping host with name [{0}]
 
 htmlHostManagerServlet.title=Tomcat Virtual Host Manager
 htmlHostManagerServlet.messageLabel=Message: