Author: jfrederic.clere(a)jboss.com
Date: 2014-02-26 08:33:47 -0500 (Wed, 26 Feb 2014)
New Revision: 2371
Modified:
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java
branches/7.4.x/src/main/java/org/jboss/web/CoyoteLogger.java
Log:
BZ 1010497: Logger at the classname.
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
---
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java 2014-02-25
17:12:41 UTC (rev 2370)
+++
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java 2014-02-26
13:33:47 UTC (rev 2371)
@@ -103,10 +103,10 @@
try {
endpoint.init();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorInitializingEndpoint(ex);
+ CoyoteLogger.HTTP_APR_LOGGER.errorInitializingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.initHttpConnector(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.initHttpConnector(getName());
}
@@ -122,7 +122,7 @@
Registry.getRegistry(null, null)
.registerComponent(endpoint, tpOname, null );
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringPool(e);
+ CoyoteLogger.HTTP_APR_LOGGER.errorRegisteringPool(e);
}
rgOname=new ObjectName
(domain + ":type=GlobalRequestProcessor,name=" +
getJmxName());
@@ -133,17 +133,17 @@
try {
endpoint.start();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorStartingEndpoint(ex);
+ CoyoteLogger.HTTP_APR_LOGGER.errorStartingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.startHttpConnector(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.startHttpConnector(getName());
}
public void pause() throws Exception {
try {
endpoint.pause();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorPausingEndpoint(ex);
+ CoyoteLogger.HTTP_APR_LOGGER.errorPausingEndpoint(ex);
throw ex;
}
canDestroy = false;
@@ -169,25 +169,25 @@
canDestroy = true;
}
}
- CoyoteLogger.HTTP_LOGGER.pauseHttpConnector(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.pauseHttpConnector(getName());
}
public void resume() throws Exception {
try {
endpoint.resume();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorResumingEndpoint(ex);
+ CoyoteLogger.HTTP_APR_LOGGER.errorResumingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.resumeHttpConnector(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.resumeHttpConnector(getName());
}
public void destroy() throws Exception {
- CoyoteLogger.HTTP_LOGGER.stopHttpConnector(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.stopHttpConnector(getName());
if (canDestroy) {
endpoint.destroy();
} else {
- CoyoteLogger.HTTP_LOGGER.cannotDestroyHttpProtocol(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.cannotDestroyHttpProtocol(getName());
try {
RequestInfo[] states = cHandler.global.getRequestProcessors();
for (int i = 0; i < states.length; i++) {
@@ -196,7 +196,7 @@
}
}
} catch (Exception ex) {
-
CoyoteLogger.HTTP_LOGGER.cannotDestroyHttpProtocolWithException(getName(), ex);
+
CoyoteLogger.HTTP_APR_LOGGER.cannotDestroyHttpProtocolWithException(getName(), ex);
throw ex;
}
}
@@ -565,10 +565,10 @@
state = result.event(status);
} catch (java.net.SocketException e) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketException(e);
} catch (java.io.IOException e) {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketException(e);
}
// Future developers: if you discover any other
// rare-but-nonfatal exceptions, catch them here, and log as
@@ -577,7 +577,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.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketError(e);
} finally {
if (state != SocketState.LONG) {
connections.remove(socket);
@@ -624,10 +624,10 @@
} catch (java.net.SocketException e) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketException(e);
} catch (java.io.IOException e) {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketException(e);
}
// Future developers: if you discover any other
// rare-but-nonfatal exceptions, catch them here, and log as
@@ -636,7 +636,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.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketError(e);
}
recycledProcessors.offer(processor);
return SocketState.CLOSED;
@@ -674,7 +674,7 @@
Registry.getRegistry(null, null).registerComponent(rp, rpName,
null);
rp.setRpName(rpName);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringRequest(e);
+ CoyoteLogger.HTTP_APR_LOGGER.errorRegisteringRequest(e);
}
}
}
@@ -690,7 +690,7 @@
Registry.getRegistry(null, null).unregisterComponent(rpName);
rp.setRpName(null);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorUnregisteringRequest(e);
+ CoyoteLogger.HTTP_APR_LOGGER.errorUnregisteringRequest(e);
}
}
}
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
===================================================================
---
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2014-02-25
17:12:41 UTC (rev 2370)
+++
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2014-02-26
13:33:47 UTC (rev 2371)
@@ -95,7 +95,7 @@
endpoint.setServerSocketChannelFactory(socketFactory);
}
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorInitializingSocketFactory(ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorInitializingSocketFactory(ex);
throw ex;
}
@@ -112,11 +112,11 @@
// endpoint.setKeepAliveTimeout(this.timeout);
endpoint.init();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorInitializingEndpoint(ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorInitializingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.initHttpConnector(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.initHttpConnector(getName());
}
/*
@@ -132,7 +132,7 @@
tpOname = new ObjectName(domain + ":" + "type=ThreadPool,name="
+ getJmxName());
Registry.getRegistry(null, null).registerComponent(endpoint, tpOname, null);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringPool(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorRegisteringPool(e);
}
rgOname = new ObjectName(domain + ":type=GlobalRequestProcessor,name=" +
getJmxName());
Registry.getRegistry(null, null).registerComponent(cHandler.global, rgOname, null);
@@ -141,10 +141,10 @@
try {
endpoint.start();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorStartingEndpoint(ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorStartingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.startHttpConnector(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.startHttpConnector(getName());
}
/*
@@ -157,7 +157,7 @@
try {
endpoint.pause();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorPausingEndpoint(ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorPausingEndpoint(ex);
throw ex;
}
canDestroy = false;
@@ -183,7 +183,7 @@
canDestroy = true;
}
}
- CoyoteLogger.HTTP_LOGGER.pauseHttpConnector(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.pauseHttpConnector(getName());
}
/*
@@ -196,10 +196,10 @@
try {
endpoint.resume();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorResumingEndpoint(ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorResumingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.resumeHttpConnector(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.resumeHttpConnector(getName());
}
/*
@@ -209,11 +209,11 @@
*/
@Override
public void destroy() throws Exception {
- CoyoteLogger.HTTP_LOGGER.stopHttpConnector(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.stopHttpConnector(getName());
if (canDestroy) {
endpoint.destroy();
} else {
- CoyoteLogger.HTTP_LOGGER.cannotDestroyHttpProtocol(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.cannotDestroyHttpProtocol(getName());
try {
RequestInfo[] states = cHandler.global.getRequestProcessors();
for (int i = 0; i < states.length; i++) {
@@ -222,7 +222,7 @@
}
}
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.cannotDestroyHttpProtocolWithException(getName(), ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.cannotDestroyHttpProtocolWithException(getName(),
ex);
throw ex;
}
}
@@ -818,10 +818,10 @@
state = processor.event(status);
} catch (java.net.SocketException e) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketException(e);
} catch (java.io.IOException e) {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketException(e);
}
// Future developers: if you discover any other
// rare-but-nonfatal exceptions, catch them here, and log as
@@ -830,7 +830,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.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketError(e);
} finally {
if (state != SocketState.LONG) {
connections.remove(channel.getId());
@@ -937,10 +937,10 @@
} catch (IOException e) {
if (e instanceof java.net.SocketException) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketException(e);
} else {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketException(e);
}
}
// Future developers: if you discover any other
@@ -950,7 +950,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.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketError(e);
}
processor.endProcessing();
recycledProcessors.offer(processor);
@@ -994,7 +994,7 @@
Registry.getRegistry(null, null).registerComponent(rp, rpName, null);
rp.setRpName(rpName);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringRequest(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorRegisteringRequest(e);
}
}
}
@@ -1013,7 +1013,7 @@
Registry.getRegistry(null, null).unregisterComponent(rpName);
rp.setRpName(null);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorUnregisteringRequest(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorUnregisteringRequest(e);
}
}
}
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java 2014-02-25
17:12:41 UTC (rev 2370)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java 2014-02-26
13:33:47 UTC (rev 2371)
@@ -157,7 +157,7 @@
endpoint.setServerSocketFactory(socketFactory);
}
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorInitializingSocketFactory(ex);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorInitializingSocketFactory(ex);
throw ex;
}
@@ -173,10 +173,10 @@
try {
endpoint.init();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorInitializingEndpoint(ex);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorInitializingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.initHttpConnector(getName());
+ CoyoteLogger.HTTP_BIO_LOGGER.initHttpConnector(getName());
}
@@ -189,7 +189,7 @@
Registry.getRegistry(null, null)
.registerComponent(endpoint, tpOname, null );
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringPool(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorRegisteringPool(e);
}
rgOname=new ObjectName
(domain + ":type=GlobalRequestProcessor,name=" +
getJmxName());
@@ -200,17 +200,17 @@
try {
endpoint.start();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorStartingEndpoint(ex);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorStartingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.startHttpConnector(getName());
+ CoyoteLogger.HTTP_BIO_LOGGER.startHttpConnector(getName());
}
public void pause() throws Exception {
try {
endpoint.pause();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorPausingEndpoint(ex);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorPausingEndpoint(ex);
throw ex;
}
// Wait for a while until all the processors are no longer processing requests
@@ -232,21 +232,21 @@
}
}
}
- CoyoteLogger.HTTP_LOGGER.pauseHttpConnector(getName());
+ CoyoteLogger.HTTP_BIO_LOGGER.pauseHttpConnector(getName());
}
public void resume() throws Exception {
try {
endpoint.resume();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorResumingEndpoint(ex);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorResumingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.resumeHttpConnector(getName());
+ CoyoteLogger.HTTP_BIO_LOGGER.resumeHttpConnector(getName());
}
public void destroy() throws Exception {
- CoyoteLogger.HTTP_LOGGER.stopHttpConnector(getName());
+ CoyoteLogger.HTTP_BIO_LOGGER.stopHttpConnector(getName());
endpoint.destroy();
if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
if (tpOname!=null)
@@ -606,10 +606,10 @@
state = result.event(status);
} catch (java.net.SocketException e) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketException(e);
} catch (java.io.IOException e) {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketException(e);
}
// Future developers: if you discover any other
// rare-but-nonfatal exceptions, catch them here, and log as
@@ -618,7 +618,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.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketError(e);
} finally {
if (state != SocketState.LONG) {
connections.remove(socket);
@@ -665,10 +665,10 @@
} catch(java.net.SocketException e) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketException(e);
} catch (java.io.IOException e) {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketException(e);
}
// Future developers: if you discover any other
// rare-but-nonfatal exceptions, catch them here, and log as
@@ -677,7 +677,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.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketError(e);
}
recycledProcessors.offer(processor);
return SocketState.CLOSED;
@@ -716,7 +716,7 @@
Registry.getRegistry(null, null).registerComponent(rp, rpName,
null);
rp.setRpName(rpName);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringRequest(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorRegisteringRequest(e);
}
}
}
@@ -732,7 +732,7 @@
Registry.getRegistry(null, null).unregisterComponent(rpName);
rp.setRpName(null);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorUnregisteringRequest(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorUnregisteringRequest(e);
}
}
}
Modified: branches/7.4.x/src/main/java/org/jboss/web/CoyoteLogger.java
===================================================================
--- branches/7.4.x/src/main/java/org/jboss/web/CoyoteLogger.java 2014-02-25 17:12:41 UTC
(rev 2370)
+++ branches/7.4.x/src/main/java/org/jboss/web/CoyoteLogger.java 2014-02-26 13:33:47 UTC
(rev 2371)
@@ -61,10 +61,24 @@
CoyoteLogger HTTP_LOGGER = Logger.getMessageLogger(CoyoteLogger.class,
"org.apache.coyote.http11");
/**
+ * A logger with the category of the class name.
+ */
+ CoyoteLogger HTTP_BIO_LOGGER = Logger.getMessageLogger(CoyoteLogger.class,
"org.apache.coyote.http11.Http11Protocol");
+
+ /**
+ * A logger with the category of the class name.
+ */
+ CoyoteLogger HTTP_APR_LOGGER = Logger.getMessageLogger(CoyoteLogger.class,
"org.apache.coyote.http11.Http11AprProtocol");
+
+ /**
+ * A logger with the category of the class name.
+ */
+ CoyoteLogger HTTP_NIO_LOGGER = Logger.getMessageLogger(CoyoteLogger.class,
"org.apache.coyote.http11.Http11NioProtocol");
+
+ /**
* A logger with the category of the package name.
*/
CoyoteLogger AJP_LOGGER = Logger.getMessageLogger(CoyoteLogger.class,
"org.apache.coyote.ajp");
-
/**
* A logger with the category of the package name.
*/