Skip to content

Commit

Permalink
Fix logging inconsistency (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdickinson committed Jun 30, 2021
1 parent ebb0a51 commit 030a5e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions traits_futures/traits_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,14 @@ def _cancel_tasks(self):
"""
Cancel all currently running tasks.
"""
logger.debug("Cancelling incomplete tasks")
logger.debug("{self} cancelling incomplete tasks")
cancel_count = 0
for wrapper in self._wrappers:
future = wrapper.future
if future.cancellable:
future.cancel()
cancel_count += 1
logger.debug(f"{cancel_count} tasks cancelled")
logger.debug(f"{self} cancelled {cancel_count} tasks")

def _initiate_stop(self):
"""
Expand Down Expand Up @@ -461,7 +461,7 @@ def _get_stopped(self):
def __internal_state_changed(self, old_internal_state, new_internal_state):
"""Trait change handler for the "_internal_state" trait."""
logger.debug(
"Executor internal state changed "
f"{self} internal state changed "
f"from {old_internal_state} to {new_internal_state}"
)

Expand Down

0 comments on commit 030a5e8

Please sign in to comment.