From 96f0d3f23463e6e63308473d8ed7027d20f4fa2f Mon Sep 17 00:00:00 2001 From: stynoo Date: Mon, 2 Oct 2023 14:23:57 +0200 Subject: [PATCH] Update sync.py: include version in debug logs Include the script's version in the debug log. This should improve troubleshooting. --- withings_sync/sync.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/withings_sync/sync.py b/withings_sync/sync.py index d65b93e..b0a501e 100644 --- a/withings_sync/sync.py +++ b/withings_sync/sync.py @@ -7,6 +7,7 @@ import json from datetime import date, datetime +from importlib.metadata import version from withings_sync.withings2 import WithingsAccount from withings_sync.garmin import GarminConnect @@ -498,6 +499,7 @@ def main(): format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", stream=sys.stdout, ) + logging.debug("withings-sync script version %s", version("withings-sync")) logging.debug("Script invoked with the following arguments: %s", ARGS) if sys.version_info < (3, 7):