Skip to content

Commit c6b49c5

Browse files
committed
-UseEventLog $false in Log Rotation
1 parent 3d7631c commit c6b49c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/Winget-AutoUpdate/functions/Invoke-LogRotation.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ function Invoke-LogRotation {
9292

9393
# Log actions
9494
if ($logrotate) {
95-
Write-ToLog "Max Standard log size reached: $MaxLogSize bytes - Rotated Logs" -IsHeader
95+
Write-ToLog "Max Standard log size reached: $MaxLogSize bytes - Rotated Logs" -IsHeader -UseEventLog $false
9696
}
9797
if ($CM_logrotate) {
98-
Write-ToLog "Max CM log size reached: $MaxLogSize bytes - Rotated CM Logs" -IsHeader
98+
Write-ToLog "Max CM log size reached: $MaxLogSize bytes - Rotated CM Logs" -IsHeader -UseEventLog $false
9999
}
100100

101101
# end of try block

Sources/Winget-AutoUpdate/functions/Write-ToLog.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ Write-ToLog "Installing $AppID..." "DarkYellow"
4545
Write-ToLog -LogMsg "Installing $AppID..." -LogColor "DarkYellow" -Component "AppInstaller" -LogLevel "1"
4646
4747
.EXAMPLE
48-
# With Event Log
49-
Write-ToLog -LogMsg "Debug information" -LogColor "Gray" -UseEventLog
48+
# Without Event Log
49+
Write-ToLog -LogMsg "Debug information" -LogColor "Gray" -UseEventLog $false
5050
5151
.EXAMPLE
5252
# As header

0 commit comments

Comments
 (0)