From df7be4a317d5c10275e7e87fe53cbfb493225171 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Tue, 24 Mar 2020 20:09:50 +0100 Subject: [PATCH] Add debug output for starting new thread instances --- lib/core/thread/New-IcingaThreadInstance.psm1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/core/thread/New-IcingaThreadInstance.psm1 b/lib/core/thread/New-IcingaThreadInstance.psm1 index 6a2fa25..7666271 100644 --- a/lib/core/thread/New-IcingaThreadInstance.psm1 +++ b/lib/core/thread/New-IcingaThreadInstance.psm1 @@ -12,6 +12,15 @@ function New-IcingaThreadInstance() $Name = New-IcingaThreadHash -ShellScript $ScriptBlock -Arguments $Arguments; } + Write-IcingaDebugMessage -Message ( + [string]::Format( + 'Creating new thread instance {0}{1}Arguments:{1}{2}', + $Name, + "`r`n", + ($Arguments | Out-String) + ) + ); + $Shell = [PowerShell]::Create(); $Shell.RunspacePool = $ThreadPool; [void]$Shell.AddScript($ScriptBlock);