I use Enterprise Library for Logging and I use different event sources for each app. I’ve noticed that creating event sources is kind of a pain sometimes. Either you have to write an app that does it for you, or you have to write some logic in your code that checks for the event source. Either way, I think that’s too bloated for in-house software. Now for software that has to be deployed, then ok, no problem I see the use. But we’re talking bout non-released code here. Code that is used on an internal site or externally facing site.
Or you can use PowerShell, simple as pie. ๐
This one liner will check for the Event Source and if it does not exist, it will create it for you. Real easy. Gotta love PowerShell.
if (![System.Diagnostics.EventLog]::SourceExists("MySourceName")) { [System.Diagnostics.EventLog]::CreateEventSource("MySourceName", "Application") }
Now if we write an event to the event log, it will show up because the source now exists. ๐
You HAVE TO love one liners that can replace entire applications. ๐ Albeit, not a big app, but an app, none the less.
Coach Factory Outlet says
http://buycoachfactoryoutletsz.com