wingetautoupdate/Winget-AutoUpdate/functions/Write-Log.ps1

10 lines
250 B
PowerShell
Raw Normal View History

2022-03-14 13:55:02 +00:00
2022-03-26 08:22:49 +00:00
function Write-Log ($LogMsg, $LogColor = "White") {
2022-03-14 13:55:02 +00:00
#Get log
$Log = "$(Get-Date -UFormat "%T") - $LogMsg"
#Echo log
$Log | Write-host -ForegroundColor $LogColor
#Write log to file
2022-03-26 08:22:49 +00:00
$Log | Out-File -FilePath $LogFile -Append
2022-03-14 13:55:02 +00:00
}