IsEnabled si semantic registration always false?

I am using SLAB because of the process for logging ETW events in my applications.

Today I have a problem with WCF services hosted under WcfTestClient.exe

When I put a breakpoint in the WriteEvent methods of my inherited EventSource class, IsEnabled () returns false !!! This way, no events are logged to my console exit from the process :(

When running my ConsoleEventSink, I can see that my eventSource is registered at the LogAlways level and None for the MatchAnyKeyword property

Any idea to check what's wrong for this issue?

Thank you in advance

+1


source to share


2 answers


You probably have a bug in the class EventSource

.

You can analyze your EventSource to see if it is defined correctly. See https://dzimchuk.net/post/troubleshooting-slab-out-of-process-logging

There's a Nuget package for it: https://www.nuget.org/packages/EnterpriseLibrary.SemanticLogging.EventSourceAnalyzer/



Try to create a unit test for it and check the result

[TestClass]
public class EventSourceTests
{
    [TestMethod]
    public void MyEventSourceShouldBeValid()
    {
        var analyzer = new EventSourceAnalyzer();

        analyzer.Inspect(MyEventSource.Log);
    }
}

      

+4


source


The EventSource and etw logs are filtered based on the provider designator, event level, and event keyword. I'm not familiar with consoleeventsink, but you will only get events if you specifically told the shell to pay attention to your particular provider, usually by giving it a provider guide. There are literally thousands (maybe tens of thousands) of network providers running on your system, and you can't just filter by level and keyword - you have to filter by guid as well.



Support for some netizens providing provider name instead of guid, in which case they generate guid by hashing the name. This often works well with the EventSource because it is also the way the EventSource creates its guide as well.

+1


source







All Articles