Logging to windows event logs looks like doesn't work

Topics: Logging Application Block
Jun 15, 2013 at 5:24 AM
I try to use the logging block follow the example, but it look like doesn't work. I try to log to file, it does work.

        var eventLog = new EventLog("Application", ".", "DemoLog");
        var eventLogTraceListener = new FormattedEventLogTraceListener(eventLog);

        // Build Configuration
        var config = new LoggingConfiguration();
        config.AddLogSource("General", SourceLevels.All, true);

        LogWriter defaultWriter = new LogWriter(config);

        defaultWriter.Write("Hello", "General");
Jun 15, 2013 at 5:38 AM
With SpecialSources, i found the issue

The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible logs: Security.