TOSQUASH: more loglevel for debug bs

sigintsaviour_citesthackin
Tyler Goodlet 2022-07-10 18:00:35 -04:00
parent 4a441f0988
commit 8291ee09b3
1 changed files with 3 additions and 2 deletions

View File

@ -104,6 +104,8 @@ async def open_root_actor(
)
loglevel = (loglevel or log._default_loglevel).upper()
if debug_mode and _spawn._spawn_method == 'trio':
_state._runtime_vars['_debug_mode'] = True
@ -117,7 +119,7 @@ async def open_root_actor(
logging.getLevelName(
# lul, need the upper case for the -> int map?
# sweet "dynamic function behaviour" stdlib...
loglevel.upper() if loglevel else loglevel,
loglevel,
) > logging.getLevelName('PDB')
):
loglevel = 'PDB'
@ -127,7 +129,6 @@ async def open_root_actor(
"Debug mode is only supported for the `trio` backend!"
)
loglevel = (loglevel or log._default_loglevel).upper()
log.get_console_log(loglevel)
# make a temporary connection to see if an arbiter exists