Skip to content

Commit de90beb

Browse files
committed
Adjust logging to be more informative and clear
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent 566067f commit de90beb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/frequenz/dispatch/_actor_dispatcher.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,13 @@ async def _stop_actor(self, stopping_dispatch: Dispatch, msg: str) -> None:
253253
identity = self._dispatch_identity(stopping_dispatch)
254254

255255
if actor_and_channel := self._actors.pop(identity, None):
256+
_logger.info("Stopping actor for dispatch type %r", stopping_dispatch.type)
256257
await actor_and_channel.actor.stop(msg)
257258
await actor_and_channel.channel.close()
258259
else:
259260
_logger.warning(
260-
"Actor for dispatch type %r is not running", stopping_dispatch.type
261+
"Actor for dispatch type %r is not running, ignoring stop request",
262+
stopping_dispatch.type,
261263
)
262264

263265
async def _run(self) -> None:

src/frequenz/dispatch/_merge_strategies.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def filter(
5858
)
5959

6060
_logger.debug(
61-
"stop event %s because other_dispatches_running=%s",
61+
"%s stop event %s because other_dispatches_running=%s",
62+
"Ignoring" if other_dispatches_running else "Allowing",
6263
dispatch.id,
6364
other_dispatches_running,
6465
)

0 commit comments

Comments
 (0)