Skip to content
Snippets Groups Projects
Commit f7fdef7f authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Logging / output changes only.

parent ae15499a
No related branches found
No related tags found
No related merge requests found
...@@ -229,17 +229,17 @@ function Update-File { ...@@ -229,17 +229,17 @@ function Update-File {
Create-Backup -FileName $DstFile Create-Backup -FileName $DstFile
} }
catch { catch {
Log-Error "Backing up $($DstFile) FAILED!`n$($_.Exception.Message)"
Exit Exit
Log-Error "Backing up [$($DstFile)] FAILED:`n> $($_.Exception.Message)"
} }
try { try {
Copy-Item -Path $SrcFile -Destination $DstPath -ErrorAction Stop Copy-Item -Path $SrcFile -Destination $DstPath -ErrorAction Stop
Log-Info "Updated config file '$($DstFile)'." Log-Info "Updated config file [$($DstFile)]."
} }
catch { catch {
Log-Error "Copying $($SrcFile) FAILED!`n$($_.Exception.Message)"
Exit Exit
Log-Error "Copying [$($SrcFile)] FAILED:`n> $($_.Exception.Message)"
} }
Return $True Return $True
} }
...@@ -332,10 +332,10 @@ function Config-IsValid { ...@@ -332,10 +332,10 @@ function Config-IsValid {
$Summary = "$("=" * 80)`n$($Summary | Out-String)`n$("=" * 80)" $Summary = "$("=" * 80)`n$($Summary | Out-String)`n$("=" * 80)"
if ($Ret) { if ($Ret) {
Log-Debug "Validated config files at [$($ConfigPath)]!`n$($Summary)" Log-Debug "Validated config files at [$($ConfigPath)]:`n$($Summary)"
Return $Ret, $Summary Return $Ret, $Summary
} }
Log-Error "Config at [$($ConfigPath)] FAILED VALIDATION!`n$($Summary)" Log-Error "Config at [$($ConfigPath)] FAILED VALIDATION:`n$($Summary)"
Return $Ret, $Summary Return $Ret, $Summary
} }
...@@ -377,8 +377,8 @@ function Copy-ServiceFiles { ...@@ -377,8 +377,8 @@ function Copy-ServiceFiles {
-Destination "$InstallationPath" -Destination "$InstallationPath"
} }
catch { catch {
Log-Error "Updating service binaries FAILED!`n$($_.Exception.Message)"
Exit Exit
Log-Error "Updating service binaries FAILED:`n> $($_.Exception.Message)"
} }
Log-Info "Updated service binaries with [$($PkgDir)]." Log-Info "Updated service binaries with [$($PkgDir)]."
} }
...@@ -397,7 +397,7 @@ function Update-ServiceBinaries { ...@@ -397,7 +397,7 @@ function Update-ServiceBinaries {
Log-Debug "Created marker file [$($MarkerFile)]." Log-Debug "Created marker file [$($MarkerFile)]."
} }
catch { catch {
Log-Error "Creating [$($MarkerFile)] FAILED!`n$($_.Exception.Message)" Log-Error "Creating [$($MarkerFile)] FAILED:`n> $($_.Exception.Message)"
Exit Exit
} }
Return $True Return $True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment