Expose SubDevDiag::get_associated_device()

When logging from a pytango device, it is often times useful to know the name of the device that the current thread is operating on behalf of, so that the logs can be associated with the appropriate device.

Currently at SKAO, we are passing logger objects around in order to keep track of this, however it is very tedious to have to pass a logger to every function call. Instead, it would be nice if we could have the logger accessible as a ContextVar so that functions can grab this global logger if required. This requires keeping track of which Tango device a particular CORBA thread is working for, which is a bit of a pain.

Fortunately, cppTango is already doing this for us with the SubDevDiag device, however, I don't think this is exposed in pyatngo.

Would it be possible to have access to this function from pytango: https://tango-controls.gitlab.io/cppTango/10.0.2/classTango_1_1SubDevDiag.html#a55c546b4fa6d784dd5c78ad2efb11464?

Assignee Loading
Time tracking Loading