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

@ -637,7 +637,6 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
catch (IOException e) catch (IOException e)
{ {
LOG.warn(e.toString()); LOG.warn(e.toString());
LOG.debug(e);
try{close();} try{close();}
catch(IOException e2){LOG.ignore(e2);} catch(IOException e2){LOG.ignore(e2);}
} }

View File

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