feat(logging): structured console logging with Start-Transcript and -Verbose#18
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Logspath fromsettings.jsonPaths.Logs(fallback:../logs); creates the directory if absentStart-Transcriptwrites a timestamped.logfile to theLogsdir at the start of each script;Stop-Transcriptis called in afinallyblock to guarantee cleanup on both normal and error exitsWrite-Hostprogress output replaced withWrite-Information -InformationAction Continue(information stream)Write-Verboseadded 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-Verboseis passedTest plan
.\scripts\Rename-Photos.ps1 -WhatIf— confirm info lines appear, noWrite-Hostoutput, transcript written toLogsdir.\scripts\Rename-Photos.ps1 -Verbose -WhatIf— confirm EXIF/GPS/OCR detail lines appear.\scripts\Build-Trips.ps1 -WhatIf— confirm info lines and summary appear, transcript written.\scripts\Build-Trips.ps1 -Verbose -WhatIf— confirm entry parsing and pairing detail lines appearStop-Transcriptfires on earlyexit 0(no photos found) and on a fatal error