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

Minor logging changes.

parent fe3021b3
No related branches found
No related tags found
No related merge requests found
...@@ -226,7 +226,7 @@ function Copy-ServiceFiles { ...@@ -226,7 +226,7 @@ function Copy-ServiceFiles {
function Update-ServiceBinaries { function Update-ServiceBinaries {
$MarkerFile = "$($UpdateMarkerPath)\$($env:COMPUTERNAME)" $MarkerFile = "$($UpdateMarkerPath)\$($env:COMPUTERNAME)"
if (Test-Path "$MarkerFile" -Type Leaf) { if (Test-Path "$MarkerFile" -Type Leaf) {
Write-Verbose "Found marker ($($MarkerFile)), not updating service." Write-Verbose "Found marker [$($MarkerFile)], not updating service."
Return $False Return $False
} }
Log-Info "Marker file ($($MarkerFile)) missing, trying to update service." Log-Info "Marker file ($($MarkerFile)) missing, trying to update service."
...@@ -234,12 +234,13 @@ function Update-ServiceBinaries { ...@@ -234,12 +234,13 @@ function Update-ServiceBinaries {
Copy-ServiceFiles Copy-ServiceFiles
try { try {
New-Item -Type File "$MarkerFile" -ErrorAction Stop | Out-Null New-Item -Type File "$MarkerFile" -ErrorAction Stop | Out-Null
Write-Verbose "Created marker file: $($MarkerFile)" Write-Verbose "Created marker file [$($MarkerFile)]."
} }
catch { catch {
Log-Error "Creating $($MarkerFile) FAILED!`n$($_.Exception.Message)" Log-Error "Creating [$($MarkerFile)] FAILED!`n$($_.Exception.Message)"
Exit Exit
} }
Log-Info "Service binaries were updated successfully."
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