Commit 0e3399c2 authored by Antoine Millet's avatar Antoine Millet

Logging of sjrpc now use only "debug" verbosity.

parent 322e1128
......@@ -82,7 +82,7 @@ class SimpleRpcClient(ConnectionManager):
try:
self._connection.receive()
except socket.error as err:
logging.error('Socket error while receiving from the client '
logging.debug('Socket error while receiving from the client '
'fd/%s: %s', fd, err)
self.shutdown()
......@@ -91,12 +91,12 @@ class SimpleRpcClient(ConnectionManager):
try:
self._connection.send()
except socket.error as err:
logging.error('Socket error while sending to the client '
logging.debug('Socket error while sending to the client '
'fd/%s: %s', fd, err)
self.shutdown()
if event & select.EPOLLHUP:
logging.error('Socket HUP fd/%s', fd)
logging.debug('Socket HUP fd/%s', fd)
self.shutdown()
def all_connections(self):
......
......@@ -119,7 +119,7 @@ class RpcConnection(object):
except socket.error as err:
if err.errno == 11:
# Errno 11 -> retry again
logging.warning('Non critical error while reading a socket:'
logging.debug('Non critical error while reading a socket:'
' %r', err)
return
......@@ -368,7 +368,7 @@ class RpcConnection(object):
# manager while cleanup.
else:
logging.warning('Malformed message received: %s', message)
logging.debug('Malformed message received: %s', message)
def shutdown(self, callback=None):
'''
......@@ -384,7 +384,7 @@ class RpcConnection(object):
try:
self._sock.close()
except socket.error as err:
logging.warning('Error while socket close: %s.', err)
logging.debug('Error while socket close: %s.', err)
# Release all running calls from this connection:
for call in self._calls.values():
......@@ -407,7 +407,7 @@ class RpcConnection(object):
try:
callback(self)
except Exception as err:
logging.error('Error while execution of shutdown '
logging.debug('Error while execution of shutdown '
'callback: %s', err)
def clean_call(self, msg_id):
......
......@@ -78,11 +78,11 @@ class SimpleRpcServer(ConnectionManager):
try:
connection.receive()
except socket.error as err:
logging.error('Socket error while receiving from client '
logging.debug('Socket error while receiving from client '
'fd/%s: %s', fd, err)
self.shutdown_client(fd)
except Exception as err:
logging.error('Unknown error while receiving from client '
logging.debug('Unknown error while receiving from client '
'fd/%s: %s', fd, err)
self.shutdown_client(fd)
......@@ -91,16 +91,16 @@ class SimpleRpcServer(ConnectionManager):
try:
connection.send()
except socket.error as err:
logging.error('Socket error while sending to the client '
logging.debug('Socket error while sending to the client '
'fd/%s: %s', fd, err)
self.shutdown_client(fd)
except Exception as err:
logging.error('Unknown error while sending to the client '
logging.debug('Unknown error while sending to the client '
'fd/%s: %s', fd, err)
self.shutdown_client(fd)
if event & select.EPOLLHUP:
logging.error('Socket HUP fd/%s', fd)
logging.debug('Socket HUP fd/%s', fd)
self.shutdown_client(fd)
......@@ -129,6 +129,6 @@ class SimpleSslRpcServer(SimpleRpcServer):
ssl_version=ssl.PROTOCOL_TLSv1,
do_handshake_on_connect=True)
except ssl.SSLError as err:
logging.error('Error when accepting ssl connection: %s', err)
logging.debug('Error when accepting ssl connection: %s', err)
else:
return sslsock, address
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment