logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject What to do with EventLogAppender on Vista and newer?
Date Sat, 10 Sep 2011 05:35:52 GMT

as stated in LOG4NET-310 EventLogAppender runs into a SecurityException
on Vista and newer if the event source doesn't exist.

ActivateOptions tries to see whether the source exists and create it if
it doesn't.  Starting with Vista even looking for a source that doesn't
exist will throw a SecurityException as you'd need to look into the
Security log as well and this requires Local Administrator privs.

I don't really know what we are supposed to do here.  All we can do is
(1) document that you need to create your event sources outside of your
application (usually during deployment) and (2) deal with the
SecurityException in a more graceful way (log something and disable the
appender, likely).

Any other ideas?


View raw message