mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes debug console output being printed while debugging is disabled
This commit is contained in:
parent
6304e0b1b7
commit
f961a854cc
1 changed files with 13 additions and 9 deletions
|
|
@ -21,14 +21,18 @@
|
||||||
|
|
||||||
function Write-IcingaConsoleDebug()
|
function Write-IcingaConsoleDebug()
|
||||||
{
|
{
|
||||||
param (
|
param (
|
||||||
[string]$Message,
|
[string]$Message,
|
||||||
[array]$Objects
|
[array]$Objects
|
||||||
);
|
);
|
||||||
|
|
||||||
Write-IcingaConsoleOutput `
|
if ((Get-IcingaFrameworkDebugMode) -eq $FALSE) {
|
||||||
-Message $Message `
|
return;
|
||||||
-Objects $Objects `
|
}
|
||||||
-ForeColor 'Blue' `
|
|
||||||
-Severity 'Debug';
|
Write-IcingaConsoleOutput `
|
||||||
|
-Message $Message `
|
||||||
|
-Objects $Objects `
|
||||||
|
-ForeColor 'Blue' `
|
||||||
|
-Severity 'Debug';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue