fix_tractor_logging: porting to latest tractor.log API(s) #74
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "fix_tractor_logging"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Like it sounds, adjusting to the new
tractor.log.get_logger()/.get_consolelog()semantics itro-ed in,https://github.com/goodboy/tractor/pull/402
Summary of changes,
.get_logger()calls to passname=__name__at the module level.get_logger()setup in pkg-modules (eg.piker.brokers.__init__) and instead calling in every lead-submod to ensure msg headers reflect each file which emits a message.logleveldown from the UI-app (normallypiker chart) to all requested subsystems so they reflect the CLI-flag level provided by the user on the console.piker.log.get_console_log()/.get_logger()to route nicely to the underlyingtractor.log.get_console_log()call given our usage inpiker.piker.piker.kinda thing.tractorinternal-logging is configured appropriately based on user input via--tl <level>from various CLI endpoints.Kinda unrelated tweaks also added here,
Cursor.is_hovered()predicate.print()s relateed to ^ to equiv logger calls.platformdirsdep to latest release version.@ -879,9 +890,12 @@ async def open_feed(providers.setdefault(mod, []).append(bs_fqme)feed.mods[mod.name] = modif (Lel, right should prolly rm all these trace branches i added while trying to figure out why
loglevelwasn’t being passed down through certain layers correctly!Removed em all in latest commit.
@ -50,4 +62,4 @@)def get_console_log(Note the changes here to handle re-routing to
tractor.log.get_console_log()appropriately given use throughoutpiker.70b663992ctod0add050b7@ -247,2 +269,3 @@order_mode.cancel_orders_under_cursor()if not dialogs:log.warning(This was originally bc i couldn’t figure out why on
swayi couldn’t mouse-over-c-cancel orders XDTurns out it was bc i had keyboard-disabled-while-typing set.
Ideally we can somehow detect this kinda thing more fancy like in the longer term. I just haven’t dug into it yet..
@ -697,3 +695,1 @@final_msg=f'cancelled orders:\n{oids}',group_key=True)# key = self.multistatus.open_status(Oh yeah right, and i disabled all these “status” things bc they never seem to clear from the bottom of the main widget/window..
will try to see how we can do em better in the future.
Lol brutal, merged into wrong base yet again !!
XD