From 8291ee09b3eea93a80232d6842fb94aa1648f50a Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 10 Jul 2022 18:00:35 -0400 Subject: [PATCH] TOSQUASH: more loglevel for debug bs --- tractor/_root.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tractor/_root.py b/tractor/_root.py index c5b8f17..f8305ee 100644 --- a/tractor/_root.py +++ b/tractor/_root.py @@ -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