You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2012/07/30 20:19:27 UTC
svn commit: r1367206 - in
/tomcat/trunk/java/org/apache/catalina/tribes/membership:
LocalStrings.properties McastService.java
Author: markt
Date: Mon Jul 30 18:19:27 2012
New Revision: 1367206
URL: http://svn.apache.org/viewvc?rev=1367206&view=rev
Log:
Fix unused StringManager`. i18n for all log messages
Added:
tomcat/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties (with props)
Modified:
tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java
Added: tomcat/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties?rev=1367206&view=auto
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties (added)
+++ tomcat/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties Mon Jul 30 18:19:27 2012
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+McastService.parseTTL=Unable to parse TTL: [{0}]
+McastService.parseSoTimeout=Unable to parse SoTimeout: [{0}]
+McastService.stopFail=Unable to stop the mcast service, level: [{0}]
+McastService.payload=Unable to send payload update
+McastService.domain=Unable to send domain update
Propchange: tomcat/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java?rev=1367206&r1=1367205&r2=1367206&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java Mon Jul 30 18:19:27 2012
@@ -330,14 +330,16 @@ public class McastService implements Mem
try {
ttl = Integer.parseInt(properties.getProperty("mcastTTL"));
} catch ( Exception x ) {
- log.error("Unable to parse mcastTTL="+properties.getProperty("mcastTTL"),x);
+ log.error(sm.getString("McastService.parseTTL",
+ properties.getProperty("mcastTTL")), x);
}
}
if ( properties.getProperty("mcastSoTimeout") != null ) {
try {
soTimeout = Integer.parseInt(properties.getProperty("mcastSoTimeout"));
} catch ( Exception x ) {
- log.error("Unable to parse mcastSoTimeout="+properties.getProperty("mcastSoTimeout"),x);
+ log.error(sm.getString("McastService.parseTTL",
+ properties.getProperty("mcastSoTimeout")), x);
}
}
@@ -374,7 +376,8 @@ public class McastService implements Mem
try {
if ( impl != null && impl.stop(svc) ) impl = null;
} catch ( Exception x) {
- log.error("Unable to stop the mcast service, level:"+svc+".",x);
+ log.error(sm.getString(
+ "McastService.stopFail", Integer.valueOf(svc)), x);
}
}
@@ -534,7 +537,7 @@ public class McastService implements Mem
try {
if (impl != null) impl.send(false);
}catch ( Exception x ) {
- log.error("Unable to send payload update.",x);
+ log.error(sm.getString("McastService.payload"), x);
}
}
}
@@ -548,7 +551,7 @@ public class McastService implements Mem
try {
if (impl != null) impl.send(false);
}catch ( Exception x ) {
- log.error("Unable to send domain update.",x);
+ log.error(sm.getString("McastService.domain"), x);
}
}
}
@@ -565,8 +568,6 @@ public class McastService implements Mem
* @throws Exception If an error occurs
*/
public static void main(String args[]) throws Exception {
- if(log.isInfoEnabled())
- log.info("Usage McastService hostname tcpport");
McastService service = new McastService();
java.util.Properties p = new java.util.Properties();
p.setProperty("mcastPort","5555");
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org