From 5e46cdfbbfb0becf84909c012a623e4b43e214f2 Mon Sep 17 00:00:00 2001 From: micbou Date: Thu, 29 Mar 2018 17:02:12 +0200 Subject: [PATCH] Reduce logging verbosity when a connection error occurs --- python/ycm/client/base_request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ycm/client/base_request.py b/python/ycm/client/base_request.py index 3c1f2ff3..dca11559 100644 --- a/python/ycm/client/base_request.py +++ b/python/ycm/client/base_request.py @@ -83,11 +83,11 @@ class BaseRequest( object ): else: _IgnoreExtraConfFile( e.extra_conf_file ) self._should_resend = True - except BaseRequest.Requests().exceptions.ConnectionError: + except BaseRequest.Requests().exceptions.ConnectionError as e: # We don't display this exception to the user since it is likely to happen # for each subsequent request (typically if the server crashed) and we # don't want to spam the user with it. - _logger.exception( 'Unable to connect to server' ) + _logger.error( e ) except Exception as e: _logger.exception( 'Error while handling server response' ) if display_message: