mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
21 lines
530 B
PowerShell
21 lines
530 B
PowerShell
function Write-IcingaDebugMessage()
|
|
{
|
|
param (
|
|
[string]$Message,
|
|
[array]$Objects = @(),
|
|
$ExceptionObject = $null
|
|
);
|
|
|
|
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 'Debug' -ExceptionObject $ExceptionObject -Objects $DebugContent;
|
|
}
|