icinga-powershell-framework/lib/core/logging/Write-IcingaDebugMessage.psm1

16 lines
396 B
PowerShell

function Write-IcingaDebugMessage()
{
param(
[string]$Message
);
if ([string]::IsNullOrEmpty($Message)) {
return;
}
if ($null -eq $global:IcingaDaemonData -Or $global:IcingaDaemonData.DebugMode -eq $FALSE) {
return;
}
Write-EventLog -LogName Application -Source 'Icinga for Windows' -EntryType Information -EventId 1000 -Message $Message;
}