Posts

Showing posts with the label tracing

How does System.Diagnostics.Tracing.EventSource.IsEnabled work?

Image
Clash Royale CLAN TAG #URR8PPP How does System.Diagnostics.Tracing.EventSource.IsEnabled work? When using a custom event source e.g.: [EventSource(Name = "MyEventSource")] public partial class CustomEventSource : EventSource { } There is an IsEnabled method on the EventSource class: EventSource.IsEnabled(eventLevel, eventKeywords) https://msdn.microsoft.com/en-us/library/hh393402(v=vs.110).aspx How does this method determine whether the event is 'Enabled' for the level and keywords? There doesn't seem to be any solid documentation on this. On my implementation the method is returning false and I am not sure what needs to be done in order to make it return true. It takes two to do this tango, the event source and the event listener. The source doesn't do the work until a somebody signals interest in the events. If the listener is a .net program then you'd use EventListener.EnableEvents(). Or you'd for example use the Windo...

What is the good option to trace/log the custom Roslyn analyzer implementation?

Image
Clash Royale CLAN TAG #URR8PPP What is the good option to trace/log the custom Roslyn analyzer implementation? We are getting intermittent crashes and additional file load issues from build machine. Unfortunately this happens only in build machine where we run automated scripts. This we are unable to trace as we don't have tracing or logging mechanism in place. What is the good option to log/trace analyzers for troubleshooting such scenarios. It would be great if we could get additional tracing/logs in the msbuild output. Currently we only have findings reported gets printed to msbuild log. Regards Basanth By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.