mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
13 lines
343 B
PowerShell
13 lines
343 B
PowerShell
function Write-IcingaErrorMessage()
|
|
{
|
|
param(
|
|
[int]$EventId = 0,
|
|
[string]$Message = $null
|
|
);
|
|
|
|
if ($EventId -eq 0 -Or [string]::IsNullOrEmpty($Message)) {
|
|
return;
|
|
}
|
|
|
|
Write-EventLog -LogName 'Icinga for Windows' -Source 'Icinga for Windows' -EntryType Error -EventId $EventId -Message $Message;
|
|
}
|