From 27f09f6b349f4d231e85699ed1d8cbfbbc110113 Mon Sep 17 00:00:00 2001 From: Felix Engelmann Date: Fri, 31 Jul 2015 12:28:05 +0200 Subject: [PATCH] KMIPServer serve log exceptions The Exception handler discards all errors, would be nice to log them to the error logger before closing the connection. --- kmip/services/kmip_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kmip/services/kmip_server.py b/kmip/services/kmip_server.py index 88973ce..78d4ce8 100644 --- a/kmip/services/kmip_server.py +++ b/kmip/services/kmip_server.py @@ -69,7 +69,8 @@ class KMIPServer(object): try: while True: self._processor.process(protocol, protocol) - except Exception: + except Exception as e: + self.logger.error('KMIPServer {0} {1}'.format(type(e),e)) connection.close() def _set_variables(self, host, port, keyfile, certfile, cert_reqs,