forked from goodboy/tractor
1
0
Fork 0

Add back subactor logging

drop-trip-update-trio^2
Tyler Goodlet 2020-07-20 19:49:39 -04:00
parent 772f9c3ac3
commit 660f310737
1 changed files with 12 additions and 0 deletions

View File

@ -62,7 +62,19 @@ async def _trio_main(
accept_addr: Tuple[str, int],
parent_addr: Tuple[str, int] = None
) -> None:
"""Entry point for a `trio_run_in_process` subactor.
Here we don't need to call `trio.run()` since trip does that as
part of its subprocess startup sequence.
"""
if actor.loglevel is not None:
log.info(
f"Setting loglevel for {actor.uid} to {actor.loglevel}")
get_console_log(actor.loglevel)
log.info(f"Started new trio process for {actor.uid}")
_state._current_actor = actor
await actor._async_main(accept_addr, parent_addr=parent_addr)
log.info(f"Actor {actor.uid} terminated")