Skip to content

feat(logging): structured console logging with Start-Transcript and -Verbose#18

Merged
ndomako10 merged 1 commit into
mainfrom
feat/logging
Mar 27, 2026
Merged

feat(logging): structured console logging with Start-Transcript and -Verbose#18
ndomako10 merged 1 commit into
mainfrom
feat/logging

Conversation

@ndomako10

Copy link
Copy Markdown
Owner

Summary

  • Resolves Logs path from settings.json Paths.Logs (fallback: ../logs); creates the directory if absent
  • Start-Transcript writes a timestamped .log file to the Logs dir at the start of each script; Stop-Transcript is called in a finally block to guarantee cleanup on both normal and error exits
  • All Write-Host progress output replaced with Write-Information -InformationAction Continue (information stream)
  • Write-Verbose added throughout for low-level detail — EXIF field values, GPS coordinates and match distance, raw OCR reading and confidence, odometer validation bounds, log entry parsing, deduplication decisions, and pairing distance deviation — all hidden unless -Verbose is passed
  • Run start and end info lines added to both scripts

Test plan

  • Run .\scripts\Rename-Photos.ps1 -WhatIf — confirm info lines appear, no Write-Host output, transcript written to Logs dir
  • Run .\scripts\Rename-Photos.ps1 -Verbose -WhatIf — confirm EXIF/GPS/OCR detail lines appear
  • Run .\scripts\Build-Trips.ps1 -WhatIf — confirm info lines and summary appear, transcript written
  • Run .\scripts\Build-Trips.ps1 -Verbose -WhatIf — confirm entry parsing and pairing detail lines appear
  • Confirm Stop-Transcript fires on early exit 0 (no photos found) and on a fatal error

…Verbose

- Resolve Logs path from settings.json Paths.Logs (fallback: ../logs)
- Start-Transcript writes timestamped .log file to Logs dir at run start
- Stop-Transcript called in finally block to guarantee cleanup on all exits
- Write-Host replaced with Write-Information -InformationAction Continue
- Write-Verbose added for EXIF values, GPS matching detail, OCR reading/confidence,
  odometer validation, entry parsing, dedup decisions, and pairing distance checks
- Run start/end info lines added to both scripts

closes #8
@ndomako10
ndomako10 merged commit e3dcaf9 into main Mar 27, 2026
@ndomako10
ndomako10 deleted the feat/logging branch March 27, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant