diff --git a/pyprland/command.py b/pyprland/command.py index 22c6c85..3bf24ff 100755 --- a/pyprland/command.py +++ b/pyprland/command.py @@ -65,9 +65,9 @@ class Pyprland: async def _callHandler(self, full_name, *params): "Call an event handler with params" - have_listeners = False for plugin in [self] + list(self.plugins.values()): if hasattr(plugin, full_name): + self.log.debug("%s.%s%s", plugin.name, full_name, params) try: await getattr(plugin, full_name)(*params) except Exception as e: # pylint: disable=W0718 @@ -75,10 +75,6 @@ class Pyprland: "%s::%s(%s) failed:", plugin.name, full_name, params ) self.log.exception(e) - else: - have_listeners = True - if have_listeners: - self.log.debug("%s%s", full_name, params) async def read_events_loop(self): "Consumes the event loop and calls corresponding handlers" diff --git a/pyprland/ipc.py b/pyprland/ipc.py index 78ef791..2e804ef 100644 --- a/pyprland/ipc.py +++ b/pyprland/ipc.py @@ -21,7 +21,7 @@ async def get_event_stream(): async def hyprctlJSON(command) -> list[dict[str, Any]] | dict[str, Any]: """Run an IPC command and return the JSON output.""" - log.debug("JS>> %s", command) + log.debug(command) try: ctl_reader, ctl_writer = await asyncio.open_unix_connection(HYPRCTL) except FileNotFoundError as e: @@ -48,7 +48,7 @@ def _format_command(command_list, default_base_command): async def hyprctl(command, base_command="dispatch") -> bool: """Run an IPC command. Returns success value.""" - log.debug("JS>> %s", command) + log.debug(command) try: ctl_reader, ctl_writer = await asyncio.open_unix_connection(HYPRCTL) except FileNotFoundError as e: @@ -65,7 +65,6 @@ async def hyprctl(command, base_command="dispatch") -> bool: resp = await ctl_reader.read(100) ctl_writer.close() await ctl_writer.wait_closed() - log.debug("<