pyatv
pyatv copied to clipboard
Replace global loggers with contextual ones everywhere
What feature would you like?
Currently, everything is logged using _LOGGER in each file (which corresponds to the current module). This however becomes confusing when having multiple connections active at the same time as you can't know which connection a log point belongs to. In some places, like in MRP, I have made some hacks to add IP addresses and port numbers, but that is what I said a hack.
Describe the solution you'd like I would prefer to use a logging adapter like I did in localtuya:
https://github.com/rospogrigio/localtuya/blob/363d76372c074a35e97fc66be289ba8c807092df/custom_components/localtuya/pytuya/init.py#L102
Any other information to share? No