Improved logging of exceptions; now stack traces are printed in debug mode, if the exception is rethrown.

This commit is contained in:
Simone Bordet 2012-01-18 12:38:28 +01:00
parent f039d00910
commit 486af62635
2 changed files with 5 additions and 6 deletions

View File

@ -280,7 +280,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
public void checkIdleTimestamp(long now)
{
long idleTimestamp=_idleTimestamp;
if (idleTimestamp!=0 && _maxIdleTime>0)
{
long idleForMs=now-idleTimestamp;
@ -637,7 +637,6 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
catch (IOException e)
{
LOG.warn(e.toString());
LOG.debug(e);
try{close();}
catch(IOException e2){LOG.ignore(e2);}
}

View File

@ -452,7 +452,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
}
catch(SSLException e)
{
_logger.warn(String.valueOf(_endp), e);
_logger.debug(String.valueOf(_endp), e);
_endp.close();
throw e;
}
@ -486,7 +486,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
break;
default:
_logger.warn("{} wrap default {}",_session,result);
_logger.debug("{} wrap default {}",_session,result);
throw new IOException(result.toString());
}
@ -528,7 +528,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
}
catch(SSLException e)
{
_logger.warn(String.valueOf(_endp), e);
_logger.debug(String.valueOf(_endp), e);
_endp.close();
throw e;
}
@ -565,7 +565,7 @@ public class SslConnection extends AbstractConnection implements AsyncConnection
break;
default:
_logger.warn("{} wrap default {}",_session,result);
_logger.debug("{} wrap default {}",_session,result);
throw new IOException(result.toString());
}