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