Closed postlund closed 3 years ago
More of a comment to myself: this issue is becoming more and more important as we get more issue reports. The logs are hard to interpret when context is missing, so this should have high priority. Since we do have a few outstanding issues, I feel that it's good to wait until most of them are merged to avoid unnecessary conflicts.
Recently I added contextual logging in
pytuya
, so all log points contains the device id. This helps a lot when debugging as it's really hard to decode which log points comes from which device (due to the async network of communication). We should do the same inLocalTuyaEntity
, so all subclasses can use for instanceself.log
to log with contextual output. We can start by adding device id here as well.