SLAB logging to Windows EventLog

Topics: Semantic Logging Application Block
Apr 10, 2013 at 10:38 PM
Hi there,

After reviewing the design doc, I found SLAB will provide logging to Windows EventLog support, while in the current CTP, seems there is no EventlogEventListener yet. We are testing the WindowsAzureEventListener, it's working great. Just wonder will EventLogEventListener be released in next CTP? And When will be the next CTP? Thanks a lot.

ZF
Editor
Apr 15, 2013 at 3:13 AM
I haven't heard an update on the timeline for EventLog support. I know the team is busy but I'll try and find out.

Thanks for taking the Semantic Logging Application Block for a test drive!

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to
Coordinator
May 7, 2013 at 3:37 AM
@Wuzhenfei

The EventLog listener is not included in the final release of SLAB. This is due to a limitation of the EventSource class – no Channels support. Once Channels are added, the EventSource will support the EventLog natively.

Grigori
May 9, 2013 at 6:50 AM
Is sounds like adding channels is on the cards. Did they give you any idea of timescales?
May 9, 2013 at 5:53 PM
No, got no idea.

Regards,
Eddie


Editor
Sep 16, 2013 at 5:43 AM
See Announcing the EventSource NuGet Package – Write to the Windows Event Log for a walkthrough on logging to the Event Log using EventSource.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to
Sep 16, 2013 at 2:59 PM
Randy,

Any timeline on when a version of SLAB supporting EventSource 4.5.1 will be out (the NuGet Microsoft.Diagnostics.Tracing version)?

Can we switch to it on our own?

Kathleen Dollard
Editor
Sep 17, 2013 at 3:27 AM
Not sure what the plans are for the new Microsoft.Diagnostics.Tracing release on NuGet (that is prerelease right now) for SLAB.

You can't use Microsoft.Diagnostics.Tracing along with SLAB since SLAB uses System.Diagnostics.Tracing.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to
Sep 17, 2013 at 11:02 AM
Randy,

Right. But with major features people have been asking for (an Event Viewer sink) only available in EventSource 4.5.1 (NuGet, Microsoft.Diagnostics.Tracing) it would be really nice to see a version of SLAB that supports it.

Do you know if it Is more than a namespace change and a recompile using a different EventSource namespace (as in a compiler #if would do the trick)?

And there's the second question of whether the SLAB custom out of proc listener support will be updated to use the NuGet TraceEvent release from the clr team so everyone writing custom tools is using the same core.

Kathleen
Coordinator
Sep 23, 2013 at 6:14 PM
Just to reiterate, EventSource 4.5.1 and Microsoft.Diagnostics.Tracing.EventSource are different things.

4.5.1 ships with the .NET framework and supports activity tracing but not channels (i.e. no event log). That should work without modifications in SLAB, but the new ActivityId property cannot be used until we rev it up. I cannot provide the timeline for that work yet, but it is on our backlog.

The pre-release NuGet package which does support channels will not work with SLAB as is. You'll need to get the SLAB source, add references to the nuget package, change namespaces to point to the package's classes and rebuild.

Grigori
Mar 7 at 6:10 AM
I just pushed an update that flips the references over to Microsoft.Diagnostics.Tracing.EventSource:
Changes to the code are available on GitHub. No guarantees on the code quality, but you can see by the diff there are some changes in how EventSource handles conflicts in the manifest that have caused EventAnalyzer to behave differently. I did not fix that as it would become a different implementation from where the SLAB team is going at some point I hope. :)
Coordinator
Mar 7 at 6:08 PM
Colin, since there are effectively two stacks of EventSource in existence today (one - in the .NET framework, and another one - in the NuGet package), we have made a decision to avoid the confusion of releasing and maintaining two versions of SLAB by just shipping the official SLAB using the EventSource from the .NET framework. If someone wants to use the additional features of the EventSource NuGet package before they make into the next version of .NET, the conversion process of getting SLAB to work against the EventSource NuGet package is pretty straightforward and doesn't require a major effort: you just do a global search and replace and add the references to the EventSource NuGet package - as you have already experienced.

It's up to the user whether they want to do the conversion themselves or use your unofficial package.

One additional action that we feel still needs to be taken to better support the EventSource NuGet package is to update the test suite, which we will do in the upcoming release of SLAB1.1.

On a separate note, the decision we've made was based on our feeling that the confusion caused by two stacks of SLAB is less desirable than the very simple conversion. If you feel strongly that this decision should be revisited, I suggest you submit a workitem and based on the votes from the user community, we'll review this again.

Thanks,
Grigori