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.
This commit is contained in:
Kyle Bolen
2026-07-28 08:29:37 +00:00
parent fecdef3acf
commit 6f7dad3296
2 changed files with 18 additions and 0 deletions

View File

@@ -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)