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

21 lines
465 B
PowerShell
Raw Normal View History

function Write-IcingaDebugMessage()
{
param(
[string]$Message,
[array]$Objects = @()
);
if ([string]::IsNullOrEmpty($Message)) {
return;
}
if ($null -eq $global:IcingaDaemonData -Or $global:IcingaDaemonData.DebugMode -eq $FALSE) {
return;
}
[array]$DebugContent = @($Message);
$DebugContent += $Objects;
Write-IcingaEventMessage -EventId 1000 -Namespace 'Framework' -Objects $DebugContent;
}