From 293bd1e890c64a569cff2fe9fe2aa8715524591e Mon Sep 17 00:00:00 2001 From: Marcin Usielski Date: Wed, 11 Oct 2023 09:08:46 +0200 Subject: [PATCH] info -> debug --- moler/device/proxy_pc2.py | 15 +++++++-------- moler/device/unixremote2.py | 8 ++++---- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/moler/device/proxy_pc2.py b/moler/device/proxy_pc2.py index 0c49b0ee8..7a7623c7a 100644 --- a/moler/device/proxy_pc2.py +++ b/moler/device/proxy_pc2.py @@ -259,7 +259,6 @@ def on_connection_lost(self, connection): self._set_state(NOT_CONNECTED) def _detect_after_open_prompt(self, set_callback): - self.logger.info("_detect_after_open_prompt !") self._after_open_prompt_detector = Wait4(detect_patterns=[r'^(.+){}'.format(self._detecting_prompt_cmd)], connection=self.io_connection.moler_connection, till_occurs_times=1) @@ -272,19 +271,19 @@ def _detect_after_open_prompt(self, set_callback): # detector.await_done(timeout=self._prompt_detector_timeout) def _set_after_open_prompt(self, event): - self.logger.info("Old reverse_state_prompts_dict: {}".format( + self.logger.debug("Old reverse_state_prompts_dict: {}".format( self._reverse_state_prompts_dict)) occurrence = event.get_last_occurrence() prompt = re.escape(occurrence['groups'][0].rstrip()) state = self._get_current_state() - self.logger.info("Found prompt '{}' for '{}'.".format(prompt, state)) + self.logger.debug("Found prompt '{}' for '{}'.".format(prompt, state)) with self._state_prompts_lock: self._state_prompts[state] = prompt - self.logger.info("New prompts: {}".format(self._state_prompts)) + self.logger.debug("New prompts: {}".format(self._state_prompts)) self._prepare_reverse_state_prompts_dict() - self.logger.info("After prepare_reverse_state_prompts_dict: {}".format(self._reverse_state_prompts_dict)) + self.logger.debug("After prepare_reverse_state_prompts_dict: {}".format(self._reverse_state_prompts_dict)) if self._prompts_event is not None: - self.logger.info("prompts event is not none") + self.logger.debug("prompts event is not none") self._prompts_event.change_prompts(prompts=self._reverse_state_prompts_dict) self._prompt_detected = True @@ -447,7 +446,7 @@ def get_cmd(self, cmd_name, cmd_params=None, check_state=True, for_state=None): for_state=for_state) def _detect_prompt_get_cmd(self): - self.logger.info("get_cmd was called but prompt has not been detected yet.") + self.logger.debug("get_cmd was called but prompt has not been detected yet.") for try_nr in range(1, 10, 1): if self._after_open_prompt_detector is None or self._after_open_prompt_detector.running() is False: self._detect_after_open_prompt(self._set_after_open_prompt) @@ -456,7 +455,7 @@ def _detect_prompt_get_cmd(self): if self._prompt_detected is True: break self.io_connection.moler_connection.sendline(self._detecting_prompt_cmd) - self.logger.info("get_cmd is canceling prompt detector.") + self.logger.debug("get_cmd is canceling prompt detector.") self._after_open_prompt_detector.cancel() if self._prompt_detected is True: break diff --git a/moler/device/unixremote2.py b/moler/device/unixremote2.py index d698989ab..c15dd7648 100644 --- a/moler/device/unixremote2.py +++ b/moler/device/unixremote2.py @@ -381,22 +381,22 @@ def on_connection_made(self, connection): self._detect_after_open_prompt(self._set_after_open_prompt) def _set_after_open_prompt(self, event): - self.logger.info("UnixRemote2 reverse_state_prompts_dict: {}".format( + self.logger.debug("UnixRemote2 reverse_state_prompts_dict: {}".format( self._reverse_state_prompts_dict)) occurrence = event.get_last_occurrence() prompt = occurrence['groups'][0].rstrip() state = self._get_current_state() with self._state_prompts_lock: self._state_prompts[state] = re.escape(prompt) - self.logger.info("Found prompt '{}' for '{}'.".format(prompt, state)) + self.logger.debug("Found prompt '{}' for '{}'.".format(prompt, state)) if state == UNIX_REMOTE: self._update_depending_on_ux_prompt() elif state == PROXY_PC: self._update_depending_on_proxy_prompt() - self.logger.info("UnixRemote2. updated _reverse_state_prompts_dict: {}".format( + self.logger.debug("UnixRemote2. updated _reverse_state_prompts_dict: {}".format( self._reverse_state_prompts_dict)) if self._prompts_event is not None: - self.logger.info("prompts event is not none") + self.logger.debug("prompts event is not none") self._prompts_event.change_prompts(prompts=self._reverse_state_prompts_dict) self._prompt_detected = True