Hi,

EventLogAppender is listed in the official documentation, with examples (
https://logging.apache.org/log4net/release/config-examples.html#eventlogappender),
but someone trying to configure this appender in a .NET (not Framework)
application quickly finds out that this class is missing from the library.
With .NET being now the recommended target framework by Microsoft (
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies),
it is unclear how to use this appender in .NET applications. The
documentation does not provide any clue on that, and does not even mention
that this appender is available only in .NET Framework version of log4net.

Looking into the code, this class is commented in the netstandard/log4net
project (
https://git-wip-us.apache.org/repos/asf?p=logging-log4net.git;a=blob_plain;f=netstandard/log4net/log4net.xproj;hb=HEAD).
I can guess it was made in order to avoid pulling Windows-specific
dependencies, however I cannot find what is the alternative provided by the
project.

So far I found Log4Net.Appenders.NetCore package that fills the gap with
the missing appender, but this package seems community-driven and abandoned
(not maintained for 4 years), though works.

Please suggest what is the best way of using EventLogAppender in modern
.NET applications. Writing to Event Log is a requirement on my project.

Thank you,
Vladimir

Reply via email to