Piotr Kliczewski has uploaded a new change for review. Change subject: stomp: reducing log footprint from stomp lib ......................................................................
stomp: reducing log footprint from stomp lib There was bunch of not needed information about being not able to process disconnect frame (part of the spec and expected) as well as a lot of entries about messages being sent. Bug-Url: https://bugzilla.redhat.com/1243710 Change-Id: I98f0c443fd50ec9e05dcf71ee1c7baabd044f48d Signed-off-by: pkliczewski <[email protected]> --- M lib/yajsonrpc/stomp.py M lib/yajsonrpc/stompReactor.py 2 files changed, 14 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/46936/1 diff --git a/lib/yajsonrpc/stomp.py b/lib/yajsonrpc/stomp.py index 9a91040..b596066 100644 --- a/lib/yajsonrpc/stomp.py +++ b/lib/yajsonrpc/stomp.py @@ -46,6 +46,7 @@ CONNECTED = "CONNECTED" ERROR = "ERROR" RECEIPT = "RECEIPT" + DISCONNECT = "DISCONNECT" class AckMode: @@ -482,7 +483,8 @@ Command.CONNECTED: self._process_connected, Command.MESSAGE: self._process_message, Command.RECEIPT: self._process_receipt, - Command.ERROR: self._process_error} + Command.ERROR: self._process_error, + Command.DISCONNECT: self._process_disconnect} @property def connected(self): @@ -518,7 +520,10 @@ frameHandler.handle_message(self, frame) def _process_receipt(self, frame, dispatcher): - self.log.warning("Receipt frame received and ignored") + self.log.debug("Receipt frame received") + + def _process_disconnect(self, frame, dispatcher): + self.log.debug("Disconnect frame received") def _process_error(self, frame, dispatcher): raise StompError(frame) diff --git a/lib/yajsonrpc/stompReactor.py b/lib/yajsonrpc/stompReactor.py index 3f003c6..9b89522 100644 --- a/lib/yajsonrpc/stompReactor.py +++ b/lib/yajsonrpc/stompReactor.py @@ -60,7 +60,8 @@ stomp.Command.CONNECT: self._cmd_connect, stomp.Command.SEND: self._cmd_send, stomp.Command.SUBSCRIBE: self._cmd_subscribe, - stomp.Command.UNSUBSCRIBE: self._cmd_unsubscribe} + stomp.Command.UNSUBSCRIBE: self._cmd_unsubscribe, + stomp.Command.DISCONNECT: self._cmd_disconnect} def _cmd_connect(self, dispatcher, frame): self.log.info("Processing CONNECT request") @@ -86,10 +87,13 @@ self._reactor.wakeup() def _cmd_subscribe(self, dispatcher, frame): - self.log.debug("Subscribe command ignored") + self.log.debug("Received subscribe command") def _cmd_unsubscribe(self, dispatcher, frame): - self.log.debug("Unsubscribe command ignored") + self.log.debug("Received unsubscribe command") + + def _cmd_disconnect(self, dispatcher, frame): + self.log.debug("Received disconnect command") def _cmd_send(self, dispatcher, frame): self._messageHandler(self, frame.body) @@ -159,7 +163,6 @@ self._stompConn._dispatcher.handle_read() def send(self, message): - self.log.debug("Sending response") res = stomp.Frame(stomp.Command.MESSAGE, {"destination": _DEFAULT_RESPONSE_DESTINATIOM, "content-type": "application/json"}, -- To view, visit https://gerrit.ovirt.org/46936 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I98f0c443fd50ec9e05dcf71ee1c7baabd044f48d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.5 Gerrit-Owner: Piotr Kliczewski <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
