diff --git a/mtda/main.py b/mtda/main.py index c0a07b9e..f34a9328 100644 --- a/mtda/main.py +++ b/mtda/main.py @@ -1571,7 +1571,7 @@ def load_www_config(self, parser): self._www.configure(dict(parser.items('www'))) def notify(self, what, info): - self.mtda.debug(3, f"main.notify({what},{info})") + self.mtda.debug(4, f"main.notify({what},{info})") result = None if self.socket is not None: @@ -1582,7 +1582,7 @@ def notify(self, what, info): if self._www is not None: self._www.notify(what, info) - self.mtda.debug(3, f"main.notify: {result}") + self.mtda.debug(4, f"main.notify: {result}") return result def start(self): @@ -1732,7 +1732,7 @@ def stop(self): self.socket = None def session_event(self, info): - self.mtda.debug(3, f"main.session_event({info})") + self.mtda.debug(4, f"main.session_event({info})") info = info.split() event = info[0] @@ -1764,7 +1764,7 @@ def session_event(self, info): self.storage_close(None) def _session_check(self, session=None): - self.mtda.debug(3, f"main._session_check({session})") + self.mtda.debug(4, f"main._session_check({session})") result = None if self._session_manager is not None: @@ -1777,7 +1777,7 @@ def _session_check(self, session=None): self.mtda.debug(2, "device powered down after " f"{self._power_timeout} seconds of inactivity") - self.mtda.debug(3, f"main._session_check: {result}") + self.mtda.debug(4, f"main._session_check: {result}") return result def _check_locked(self, session): diff --git a/mtda/session.py b/mtda/session.py index a6cf523d..09a902a8 100644 --- a/mtda/session.py +++ b/mtda/session.py @@ -28,7 +28,7 @@ def __init__(self, mtda, lock_timeout, session_timeout): self._sessions = {} def check(self, session=None): - self.mtda.debug(3, f"session.check({session})") + self.mtda.debug(4, f"session.check({session})") events = [] now = time.monotonic() @@ -45,7 +45,7 @@ def check(self, session=None): inactive = [] for s in self._sessions: left = self._sessions[s] - now - self.mtda.debug(3, "session %s: %d seconds" % (s, left)) + self.mtda.debug(4, "session %s: %d seconds" % (s, left)) if left <= 0: inactive.append(s) for s in inactive: @@ -73,11 +73,11 @@ def check(self, session=None): for e in events: self.notify(e) - self.mtda.debug(3, f"session.check: {result}") + self.mtda.debug(4, f"session.check: {result}") return result def lock(self, session): - self.mtda.debug(3, f"session.lock({session})") + self.mtda.debug(4, f"session.lock({session})") self.check(session) with self._lock: @@ -88,7 +88,7 @@ def lock(self, session): else: result = False - self.mtda.debug(3, f"session.lock(): {result}") + self.mtda.debug(4, f"session.lock(): {result}") return result def locked(self, session): @@ -100,7 +100,7 @@ def locked(self, session): return result def unlock(self, session): - self.mtda.debug(3, f"session.unlock({session})") + self.mtda.debug(4, f"session.unlock({session})") result = False self.check(session) @@ -112,11 +112,11 @@ def unlock(self, session): if result is True: self.notify(f"UNLOCKED {session}") - self.mtda.debug(3, f"session.unlock: {result}") + self.mtda.debug(4, f"session.unlock: {result}") return result def notify(self, info): - self.mtda.debug(3, f"session.notify({info})") + self.mtda.debug(4, f"session.notify({info})") result = None if info is not None: @@ -124,21 +124,21 @@ def notify(self, info): m.session_event(info) self.mtda.notify(CONSTS.EVENTS.SESSION, info) - self.mtda.debug(3, f"session.notify: {result}") + self.mtda.debug(4, f"session.notify: {result}") return result def monitor(self, monitor): - self.mtda.debug(3, "session.monitor()") + self.mtda.debug(4, "session.monitor()") result = None with self._lock: self._monitors.append(monitor) - self.mtda.debug(3, f"session.monitor: {result}") + self.mtda.debug(4, f"session.monitor: {result}") return result def set_timeout(self, timeout, session=None): - self.mtda.debug(3, f"session.set_timeout({timeout}, {session})") + self.mtda.debug(4, f"session.set_timeout({timeout}, {session})") with self._lock: result = self._session_timeout @@ -150,5 +150,5 @@ def set_timeout(self, timeout, session=None): self._sessions[s] = now + timeout self.check(session) - self.mtda.debug(3, f"session.set_timeout: {result}") + self.mtda.debug(4, f"session.set_timeout: {result}") return result