Danielhiversen / pyTibber

Async Python 3 library for Tibber
GNU General Public License v3.0
96 stars 34 forks source link

Logs flooded by Pytibber #312

Open benganellison opened 4 days ago

benganellison commented 4 days ago

I'm running home assistant and use the tibber integration, and now i'm having an issue with an other integration but it is hard to find something in the logs when it gets flooded by this integration every 10 seconds or more.

2024-10-20 14:04:31.505 INFO (MainThread) [gql.transport.websockets] <<< {"id":"1","type":"next","payload":{"data":{"liveMeasurement":... 2024-10-20 14:04:41.322 INFO (MainThread) [gql.transport.websockets] <<< {"id":"1","type":"next","payload":{"data":{"liveMeasurement":... 2024-10-20 14:04:51.635 INFO (MainThread) [gql.transport.websockets] <<< {"id":"1","type":"next","payload":{"data":{"liveMeasurement":...

according to previous discussions and even pull request in the graphql library used this should be (for now) fixed in the applications using the library.

Set log level for graphql to debug: https://github.com/graphql-python/gql/pull/453 https://gql.readthedocs.io/en/stable/advanced/logging.html

from gql.transport.websockets import log as websockets_logger
websockets_logger.setLevel(logging.WARNING)

If i create a pull request with this change, will you accept it?

Danielhiversen commented 2 days ago

That be great 👍