Installing Event Sources For The Logging Application Block

Topics: Logging Application Block
Sep 14, 2007 at 2:29 PM
What's the correct way of installing event sources when you use the (EntLib 2.0) Logging Application Block?

The event sources should be defined at application installation time so that the application itself doesn't need to have administrative privileges, but since the Logging Application Block is configurable, it's not so clear what should be done.

Creating the event sources using an installer doesn't seem like the correct approach, since an administrator may later on change the event sources in the configuration file.

The most correct thing to do may be to create a generic installer that loads the Logging Application Block's configuration section and creates all event sources defined therein. An administrator changing event sources would then have to run installutil against this installer every time he or she changes an event source.

Does such an installer exist?
Sep 17, 2007 at 3:06 PM
Hi,

I'm not aware of such an installer and it would be helpful. I think however that changing the event sources after the application is installed should not be a very common event, even if it's technically possible.

Regards,
Fernando
Sep 20, 2007 at 7:56 PM
Well, since such an Installer didn't seem to exist, I went ahead and created one myself :)

I've described it in excrutiating detail on my blog: http://blogs.msdn.com/ploeh/archive/2007/09/20/InstallingEventSourcesForTheLoggingApplicationBlock.aspx
Sep 21, 2007 at 12:10 PM
Great news! Would you consider adding it to \entlibcontrib?

Fernando
Sep 24, 2007 at 12:22 PM
Is it applicable to entlibcontrib? I've only created it for EntLib 2.0...
Sep 24, 2007 at 12:26 PM
Hi,


ploeh wrote:
Is it applicable to entlibcontrib? I've only created it for EntLib 2.0...


The config source APIs and the configuration schema haven't really changed, so updating the project for the new version should be enough in case you're interested.

Thanks,
Fernando
Oct 2, 2007 at 1:35 PM
FYI, the Installer (and unit test code) has now been checked in to EntLibContrib.