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()
|
||||
{
|
||||
param (
|
||||
[string]$Message,
|
||||
[array]$Objects
|
||||
);
|
||||
param (
|
||||
[string]$Message,
|
||||
[array]$Objects
|
||||
);
|
||||
|
||||
Write-IcingaConsoleOutput `
|
||||
-Message $Message `
|
||||
-Objects $Objects `
|
||||
-ForeColor 'Blue' `
|
||||
-Severity 'Debug';
|
||||
if ((Get-IcingaFrameworkDebugMode) -eq $FALSE) {
|
||||
return;
|
||||
}
|
||||
|
||||
Write-IcingaConsoleOutput `
|
||||
-Message $Message `
|
||||
-Objects $Objects `
|
||||
-ForeColor 'Blue' `
|
||||
-Severity 'Debug';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue