Author: jstrachan
Date: Tue Feb 14 08:54:36 2006
New Revision: 377765
URL: http://svn.apache.org/viewcvs?rev=377765&view=rev
Log:
enabled logging by default of all service exceptions
Modified:
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
Modified:
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
URL:
http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java?rev=377765&r1=377764&r2=377765&view=diff
==============================================================================
---
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
(original)
+++
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
Tue Feb 14 08:54:36 2006
@@ -72,7 +72,8 @@
*/
public abstract class AbstractConnection implements Service, Connection, Task,
CommandVisitor {
- private static final Log log = LogFactory.getLog(AbstractConnection.class);
+ private static final Log transportLog =
LogFactory.getLog(AbstractConnection.class.getName() + ".Transport");
+ private static final Log serviceLog =
LogFactory.getLog(AbstractConnection.class.getName() + ".Service");
protected final Broker broker;
@@ -159,10 +160,8 @@
public void serviceTransportException(IOException e) {
if( !disposed ) {
- if( log.isDebugEnabled() )
- log.debug("Transport failed: "+e,e);
-
- log.debug("Transport failed: "+e,e);
+ if( transportLog.isDebugEnabled() )
+ transportLog.debug("Transport failed: "+e,e);
ServiceSupport.dispose(this);
}
}
@@ -171,8 +170,7 @@
if( !disposed && !inServiceException ) {
inServiceException = true;
try {
- if( log.isDebugEnabled() )
- log.debug("Async error occurred: "+e,e);
+ serviceLog.info("Async error occurred: "+e,e);
ConnectionError ce = new ConnectionError();
ce.setException(e);
dispatchAsync(ce);
@@ -191,8 +189,7 @@
response = command.visit(this);
} catch ( Throwable e ) {
if( responseRequired ) {
- if( log.isDebugEnabled() )
- log.debug("Sync error occurred: "+e,e);
+ serviceLog.info("Sync error occurred: "+e,e);
response = new ExceptionResponse(e);
} else {
serviceException(e);