I understand that using Perfmon.msc
you can create a custom performance counter and by using counter log, you can write the counter value to a text file.
I also understand I can also use this programatically by creating a performance counter by using System.Diagnostics.PerformanceCounter
, and get the counter value using NextValue()
method.
Is there a programatical way to tell the PerformanceCounter
object to write the log to a text file too (similar to Counter Log in perfmon.msc
)?