remm 02/05/16 12:25:41 Modified: http11/src/java/org/apache/coyote/http11 Http11Protocol.java LocalStrings.properties Log: - Do the i18n for the HTTP/1.1 protocol handler. Revision Changes Path 1.13 +25 -11 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java Index: Http11Protocol.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Protocol.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Http11Protocol.java 16 May 2002 18:57:39 -0000 1.12 +++ Http11Protocol.java 16 May 2002 19:25:41 -0000 1.13 @@ -85,6 +85,13 @@ */ public class Http11Protocol implements ProtocolHandler { + + /** + * The string manager for this package. + */ + protected static StringManager sm = + StringManager.getManager(Constants.Package); + Adapter adapter; Http11ConnectionHandler cHandler=new Http11ConnectionHandler( this ); @@ -92,7 +99,7 @@ */ public void setAttribute( String name, Object value ) { - log.info("setAttribute " + name + " " + value ); + log.info(sm.getString("http11protocol.setattribute", name, value)); attributes.put(name, value); /* if ("maxKeepAliveRequests".equals(name)) { @@ -125,7 +132,8 @@ try { checkSocketFactory(); } catch( Exception ex ) { - log.error( "Error initializing socket factory", ex ); + log.error(sm.getString("http11protocol.socketfactory.initerror"), + ex); throw ex; } @@ -141,10 +149,10 @@ try { ep.initEndpoint(); } catch (Exception ex) { - log.error("Error initializing endpoint", ex); + log.error(sm.getString("http11protocol.endpoint.initerror"), ex); throw ex; } - log.info( "Init on " + ep.getPort() ); + log.info(sm.getString("http11protocol.init", "" + ep.getPort())); } @@ -152,10 +160,10 @@ try { ep.startEndpoint(); } catch (Exception ex) { - log.error("Error starting endpoint", ex); + log.error(sm.getString("http11protocol.endpoint.starterror"), ex); throw ex; } - log.info( "Starting on " + ep.getPort() ); + log.info(sm.getString("http11protocol.start", "" + ep.getPort())); } public void destroy() throws Exception { @@ -382,12 +390,18 @@ TcpConnection.shutdownInput( socket ); } catch(java.net.SocketException e) { // SocketExceptions are normal - proto.log.info( "SocketException reading request, ignored"); - proto.log.debug( "SocketException reading request:", e); + proto.log.info(sm.getString + ("http11protocol.proto.socketexception.info")); + proto.log.debug + (sm.getString + ("http11protocol.proto.socketexception.debug"), e); } catch (java.io.IOException e) { // IOExceptions are normal - proto.log.info( "IOException reading request, ignored"); - proto.log.debug( "IOException reading request:", e); + proto.log.info(sm.getString + ("http11protocol.proto.ioexception.info")); + proto.log.debug + (sm.getString + ("http11protocol.proto.ioexception.debug"), e); } // Future developers: if you discover any other // rare-but-nonfatal exceptions, catch them here, and log as @@ -396,7 +410,7 @@ // any other exception or error is odd. Here we log it // with "ERROR" level, so it will show up even on // less-than-verbose logs. - proto.log.error( "Error reading request, ignored", e); + proto.log.error(sm.getString("http11protocol.proto.error"), e); } finally { // if(proto.adapter != null) proto.adapter.recycle(); // processor.recycle(); 1.3 +13 -1 jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties Index: LocalStrings.properties =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/LocalStrings.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- LocalStrings.properties 18 Apr 2002 18:16:01 -0000 1.2 +++ LocalStrings.properties 16 May 2002 19:25:41 -0000 1.3 @@ -1,4 +1,4 @@ -# $Id: LocalStrings.properties,v 1.2 2002/04/18 18:16:01 remm Exp $ +# $Id: LocalStrings.properties,v 1.3 2002/05/16 19:25:41 remm Exp $ # language @@ -7,6 +7,18 @@ # # Http11Protocol # + +http11protocol.endpoint.initerror=Error initializing endpoint +http11protocol.endpoint.starterror=Error starting endpoint +http11protocol.init=Initializing Coyote HTTP/1.1 protocol handler on port {0} +http11protocol.proto.error=Error reading request, ignored +http11protocol.proto.ioexception.debug=IOException reading request +http11protocol.proto.ioexception.info=IOException reading request, ignored +http11protocol.proto.socketexception.debug=SocketException reading request +http11protocol.proto.socketexception.info=SocketException reading request, ignored +http11protocol.setattribute=Attribute {0}: {1} +http11protocol.socketfactory.initerror=Error initializing socket factory +http11protocol.start=Starting Coyote HTTP/1.1 protocol handler on port {0} # # Http11Processor
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>