From 1d387c08a28c1b580415c8165f7d5fda2d072231 Mon Sep 17 00:00:00 2001 From: Christopher Bock Date: Sun, 21 Jul 2024 05:23:40 +0200 Subject: [PATCH 1/2] Write-ToLog: shorten the header code --- Sources/WAU/Winget-AutoUpdate/functions/Write-ToLog.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WAU/Winget-AutoUpdate/functions/Write-ToLog.ps1 b/Sources/WAU/Winget-AutoUpdate/functions/Write-ToLog.ps1 index 38f31aa..37f1ee3 100644 --- a/Sources/WAU/Winget-AutoUpdate/functions/Write-ToLog.ps1 +++ b/Sources/WAU/Winget-AutoUpdate/functions/Write-ToLog.ps1 @@ -26,7 +26,7 @@ function Write-ToLog { #If header requested if ($IsHeader) { - $Log = " `n################################################################`n# $(Get-Date -Format (Get-culture).DateTimeFormat.ShortDatePattern) - $LogMsg`n################################################################" + $Log = "#"*65 + "`n#`t$(Get-Date -Format (Get-culture).DateTimeFormat.ShortDatePattern)`n" + "#"*65 } else { $Log = "$(Get-Date -UFormat "%T") - $LogMsg" From 94713ece015a701cd44d6ae766ef00851f604039 Mon Sep 17 00:00:00 2001 From: Christopher Bock Date: Sun, 28 Jul 2024 06:32:16 +0200 Subject: [PATCH 2/2] Write-ToLog: add missing $LogMsg --- Sources/WAU/Winget-AutoUpdate/functions/Write-ToLog.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WAU/Winget-AutoUpdate/functions/Write-ToLog.ps1 b/Sources/WAU/Winget-AutoUpdate/functions/Write-ToLog.ps1 index 37f1ee3..1e0891e 100644 --- a/Sources/WAU/Winget-AutoUpdate/functions/Write-ToLog.ps1 +++ b/Sources/WAU/Winget-AutoUpdate/functions/Write-ToLog.ps1 @@ -26,7 +26,7 @@ function Write-ToLog { #If header requested if ($IsHeader) { - $Log = "#"*65 + "`n#`t$(Get-Date -Format (Get-culture).DateTimeFormat.ShortDatePattern)`n" + "#"*65 + $Log = "#"*65 + "`n#`t$(Get-Date -Format (Get-culture).DateTimeFormat.ShortDatePattern) - $LogMsg`n" + "#"*65 } else { $Log = "$(Get-Date -UFormat "%T") - $LogMsg"