Some minor corrections and more checking for exceptions (#267)

* better logging, indicate URL used on API errors, check exceptions in more places to dont kill threads, add option for mqtt logging

* dont force token renew on 5xx errors

* indicate payload on error message to understand better issue #270

* better checking on received update_interval #270

---------

Co-authored-by: Linus Dietz <45101649+Dielee@users.noreply.github.com>
This commit is contained in:
Ivan F. Martinez
2025-07-12 17:37:46 +02:00
committed by GitHub
co-authored by Linus Dietz
parent f1914e99c3
commit ee9d3cdef9
4 changed files with 104 additions and 61 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ def setup_logging():
logging.Formatter.converter = lambda *args: datetime.now(tz=TZ).timetuple()
file_log_handler = logging.handlers.RotatingFileHandler(log_location, maxBytes=1000000, backupCount=1)
formatter = logging.Formatter(
'%(asctime)s volvo2mqtt [%(process)d] - %(levelname)s: %(message)s',
'%(asctime)s volvo2mqtt [%(threadName)s] [%(process)d] - %(levelname)s: %(message)s',
'%b %d %H:%M:%S')
file_log_handler.setFormatter(formatter)