Skip to content

Commit 07230be

Browse files
committed
♻️ (ImagesToBlobStorage.ps1): replace Write-Debug with Write-InfoLog and Write-ErrorLog for improved logging clarity
The changes replace the use of Write-Debug with Write-InfoLog and Write-ErrorLog to provide more meaningful and clear logging messages. This enhances the readability and understanding of the log outputs, making it easier to distinguish between informational messages and error messages during the execution of the script.
1 parent 34026cd commit 07230be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.powershell/_includes/ImagesToBlobStorage.ps1

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ function Delete-LocalImageFiles {
2727
[string]$LocalPath
2828
)
2929
try {
30-
Write-Debug "Deleting all image files locally..."
30+
Write-InfoLog "Deleting all image files locally..."
3131
Get-ChildItem -Path $LocalPath -Recurse -Include *.jpg, *.jpeg, *.png, *.gif, *.webp, *.svg | ForEach-Object {
3232
try {
3333
Remove-Item -Path $_.FullName -Force
34-
Write-Debug "Deleted: $($_.FullName)"
34+
Write-InfoLog "Deleted: $($_.FullName)"
3535
}
3636
catch {
37-
Write-Debug "Error deleting file $($_.FullName): $_"
37+
Write-ErrorLog "Error deleting file $($_.FullName): $_"
3838
}
3939
}
4040
}
4141
catch {
42-
Write-Debug "Error during file deletion: $_"
42+
Write-ErrorLog "Error during file deletion: $_"
4343
}
4444
}
4545

0 commit comments

Comments
 (0)