Does the extension method AddEventLog
of Microsoft.Extensions.Logging.ILoggingBuilder
does also work when the application runs under a Linux OS or would it cause an exception when there is no Windows Event Log present?
No it does not. The event log is windows specific and in fact, if you do try to use it without checking for windows support explicitly, you will get a warning in the IDE: