C
C#•2y ago
kunio_kun

ASP.NET Core Logging in EventsViewer Filter

Hi, I have a .NET 6 ASP.NET Core MVC app that is configured as Windows service with UseWindowsService() and logging to EventLog with UseEventLog(), but is there a way to register the application so it shows up in this dialog of EventViewer so it will be easier to filter? Thanks in advance
2 Replies
undisputed world champions
you can call UseEventLog() with a EventLogSettings allowing you to set the LogName and the SourceName iirc you can filter by both in the eventlog 😉
kunio_kun
kunio_kun•2y ago
Kay will try it out