File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Sources/Winget-AutoUpdate/functions Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -116,12 +116,17 @@ function Write-ToLog {
116116 $StandardLogLine = " $FormattedDate $LogMsg "
117117
118118 # If header requested, format and write to console and standard log file
119- # Note: The header is not written to the CM log file or Event log, as it is not in the correct format
119+ # Note: The big header is not written to the CM log file or Event log, as it is not in the correct format
120120 if ($IsHeader ) {
121121 $Log = " #" * 65 + " `n # $ ( Get-Date - Format (Get-culture ).DateTimeFormat.ShortDatePattern) - $LogMsg `n " + " #" * 65
122122 Write-Host $Log - ForegroundColor $LogColor
123- # Write log to file
123+ # Write log to file
124124 $Log | Out-File - FilePath $StandardLogFile - Append
125+
126+ # Set a small header for CM/Event log
127+ if ($UseCMLog -or $UseEventLog ) {
128+ $LogMsg = " ### $LogMsg ###"
129+ }
125130 }
126131 else {
127132 Write-Host $StandardLogLine - ForegroundColor $LogColor
You can’t perform that action at this time.
0 commit comments