Does .NET have something similar to Java's garbage collection log?

.net, c#, garbage-collection, logging

Solution

GC stats are available as performance counters. In perfmon they're displayed under the ".NET CLR Memory" category. You can access perf counters programmatically via the System.Diagnostics namespace (the PerformanceCounterXxx classes), or use Server Explorer to create handy wrappers.

Note that these are statistics and do not provide detailed per-object logging.

Problem

Does .NET have something similar to Java's garbage collection log? I want to write GC stats to a log in a production application. Google doesn't tell my anything useful and SO doesn't seem to have any related questions either. Thanks

Original source