From 6f7dad3296e846426b99336275107b33be8dc5a1 Mon Sep 17 00:00:00 2001 From: Kyle Bolen Date: Tue, 28 Jul 2026 08:29:37 +0000 Subject: [PATCH] Add debug logging to diagnose iOS stat date issue iOS helper: log raw stat keys+values for first file to stderr. IosConnector: already logs stderr at WARN level. logback.xml: print DEBUG+ for photophetch package to console so stat output is visible when running ./gradlew run. --- src/main/resources/logback.xml | 13 +++++++++++++ .../resources/scripts/photophetch-ios-helper.py | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 src/main/resources/logback.xml diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml new file mode 100644 index 0000000..4efdbb2 --- /dev/null +++ b/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + %d{HH:mm:ss} [%-5level] %logger{20} - %msg%n + + + + + + + + + diff --git a/src/main/resources/scripts/photophetch-ios-helper.py b/src/main/resources/scripts/photophetch-ios-helper.py index ec9d0df..41b70eb 100644 --- a/src/main/resources/scripts/photophetch-ios-helper.py +++ b/src/main/resources/scripts/photophetch-ios-helper.py @@ -69,6 +69,7 @@ async def cmd_list_photos(): return photos = [] + debug_logged = False # log raw stat for first file to help debug date issues for folder in sorted(dcim_entries): folder_path = f'/DCIM/{folder}' @@ -89,6 +90,10 @@ async def cmd_list_photos(): date_iso = None try: info = await afc.stat(device_path) + if not debug_logged: + print(f'DEBUG stat keys: {list(info.keys())}', file=sys.stderr) + print(f'DEBUG stat values: {dict(info)}', file=sys.stderr) + debug_logged = True size_bytes = int(info.get('st_size', 0)) mtime_raw = int(info.get('st_mtime', 0)) # Determine if nanoseconds (>1e15) or seconds (>1e9)