I need the to write a log message and capture that in PerfView. I would like to avoid using EventLog
or EventSource
because they are quite invasive: they require registering a new source or ETW provider, which leaves leftovers in the system.
Ideally I just want to call Debug.WriteLine
(which uses OutputDebugString), but it seems that PerfView cannot collect it. Or is there some ETW provider that sees debug messages?
If you have an answer, please state the two parts of the solution:
- What should I write in C#, and
- How to configure PerfView to capture it (if there is some ETW provider, just name it).