mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Adds debug output for performance counter initialising
This commit is contained in:
parent
b282bcfa3a
commit
a3074739c0
1 changed files with 4 additions and 11 deletions
|
|
@ -28,17 +28,10 @@
|
|||
$pc_instance | Add-Member -membertype NoteProperty -name 'SkipWait' -value $SkipWait;
|
||||
|
||||
$pc_instance | Add-Member -membertype ScriptMethod -name 'Init' -value {
|
||||
|
||||
# TODO: Re-Implement debug logging
|
||||
<#$Icinga2.Log.Write(
|
||||
$Icinga2.Enums.LogState.Debug,
|
||||
[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
|
||||
)
|
||||
);#>
|
||||
|
||||
Write-IcingaConsoleDebug `
|
||||
-Message 'Creating new Counter for Category "{0}" with Instance "{1}" and Counter "{2}". Full Name "{3}"' `
|
||||
-Objects $this.Category, $this.Instance, $this.Counter, $this.FullName;
|
||||
|
||||
# Create the Performance Counter object we want to access
|
||||
$this.PerfCounter = New-Object System.Diagnostics.PerformanceCounter;
|
||||
|
|
|
|||
Loading…
Reference in a new issue