News for hackers. Stuff that matters.
Re:You say “cave dweller debugging”, I say debug logging by shakna on Friday May 06, 2022 @08:08PM (#31290903)

    import logging
    import threading

    logger = logging.getLogger(__name__)

    def log(fn):
        def log_inner(*a, **kw):
           logger.info('%s(%s, %s) @ %s', fn, a, kw, threading.get_native_id())
           return fn(*a, **kw)
        return log_inner
It's pretty easy to grab all the arguments and thread, but grabbing the return would depend on you not mutating anything permanent, so that probably needs some special casing.
Re:You say “cave dweller debugging”, I say debug logging by bckr on Thursday May 12, 2022 @08:52PM (#31361926)
Thanks for typing that up! The test will be whether this will help as much as I think it would in a real system.