mirror of https://github.com/apache/activemq.git
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
This commit is contained in:
parent
1b3a5939a8
commit
329e2f3b99
|
@ -72,7 +72,8 @@ import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractConnection implements Service, Connection, Task, CommandVisitor {
|
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;
|
protected final Broker broker;
|
||||||
|
|
||||||
|
@ -159,10 +160,8 @@ public abstract class AbstractConnection implements Service, Connection, Task, C
|
||||||
|
|
||||||
public void serviceTransportException(IOException e) {
|
public void serviceTransportException(IOException e) {
|
||||||
if( !disposed ) {
|
if( !disposed ) {
|
||||||
if( log.isDebugEnabled() )
|
if( transportLog.isDebugEnabled() )
|
||||||
log.debug("Transport failed: "+e,e);
|
transportLog.debug("Transport failed: "+e,e);
|
||||||
|
|
||||||
log.debug("Transport failed: "+e,e);
|
|
||||||
ServiceSupport.dispose(this);
|
ServiceSupport.dispose(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,8 +170,7 @@ public abstract class AbstractConnection implements Service, Connection, Task, C
|
||||||
if( !disposed && !inServiceException ) {
|
if( !disposed && !inServiceException ) {
|
||||||
inServiceException = true;
|
inServiceException = true;
|
||||||
try {
|
try {
|
||||||
if( log.isDebugEnabled() )
|
serviceLog.info("Async error occurred: "+e,e);
|
||||||
log.debug("Async error occurred: "+e,e);
|
|
||||||
ConnectionError ce = new ConnectionError();
|
ConnectionError ce = new ConnectionError();
|
||||||
ce.setException(e);
|
ce.setException(e);
|
||||||
dispatchAsync(ce);
|
dispatchAsync(ce);
|
||||||
|
@ -191,8 +189,7 @@ public abstract class AbstractConnection implements Service, Connection, Task, C
|
||||||
response = command.visit(this);
|
response = command.visit(this);
|
||||||
} catch ( Throwable e ) {
|
} catch ( Throwable e ) {
|
||||||
if( responseRequired ) {
|
if( responseRequired ) {
|
||||||
if( log.isDebugEnabled() )
|
serviceLog.info("Sync error occurred: "+e,e);
|
||||||
log.debug("Sync error occurred: "+e,e);
|
|
||||||
response = new ExceptionResponse(e);
|
response = new ExceptionResponse(e);
|
||||||
} else {
|
} else {
|
||||||
serviceException(e);
|
serviceException(e);
|
||||||
|
|
Loading…
Reference in New Issue