Adds debug output for performance counter initialising

This commit is contained in:
Lord Hepipud 2020-07-29 15:35:10 +02:00
parent b282bcfa3a
commit a3074739c0

View file

@ -29,16 +29,9 @@
$pc_instance | Add-Member -membertype ScriptMethod -name 'Init' -value { $pc_instance | Add-Member -membertype ScriptMethod -name 'Init' -value {
# TODO: Re-Implement debug logging Write-IcingaConsoleDebug `
<#$Icinga2.Log.Write( -Message 'Creating new Counter for Category "{0}" with Instance "{1}" and Counter "{2}". Full Name "{3}"' `
$Icinga2.Enums.LogState.Debug, -Objects $this.Category, $this.Instance, $this.Counter, $this.FullName;
[string]::Format('Creating new Counter for Category {0} with Instance {1} and Counter {2}. Full Name "{3}"',
$this.Category,
$this.Instance,
$this.Counter,
$this.FullName
)
);#>
# Create the Performance Counter object we want to access # Create the Performance Counter object we want to access
$this.PerfCounter = New-Object System.Diagnostics.PerformanceCounter; $this.PerfCounter = New-Object System.Diagnostics.PerformanceCounter;