From 329e2f3b997fc6cf1bb4188c3c6215649c1ccc78 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Tue, 14 Feb 2006 16:54:36 +0000 Subject: [PATCH] enabled logging by default of all service exceptions git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@377765 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/broker/AbstractConnection.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java b/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java index c33d6f41f2..6da09bf1f2 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java @@ -72,7 +72,8 @@ import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap; */ 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 abstract class AbstractConnection implements Service, Connection, Task, C 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 @@ public abstract class AbstractConnection implements Service, Connection, Task, C 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 @@ public abstract class AbstractConnection implements Service, Connection, Task, C 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);