Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Event Log by Event Source #180

Open
JaredShaver opened this issue Aug 9, 2024 · 2 comments
Open

Filter Event Log by Event Source #180

JaredShaver opened this issue Aug 9, 2024 · 2 comments
Assignees

Comments

@JaredShaver
Copy link

Is your feature request related to a problem? Please describe.
The Application Event Log has many useful messages for troubleshooting but it is also very noisy. When working with the Windows Event logs in a normal server situation, the Event Viewer and the APIs for allow for robust filtering. When working with Windows Containers, due to their ephemeral nature, event logs must be pushed out of the container and into some log aggregation tool like Azure Monitor. The LogMonitor gives an all/nothing experience for working with the Event Logs with no filtering or fine grain control.

Describe the solution you'd like
Event Log entries to also emit the Event Source name as appears in the Windows Event Log. Additionally, a way to define a list of Event Source names, and only those matching would be emitted by LogMonitor. Example: An ASP.NET application may only be interested in Event sources ASP.NET 4.0.30319.0 and IIS-W3SVC-WP.

Describe alternatives you've considered
Since the Event Source is not emitted the only alternative would be to create some custom fork of LogMon which is not ideal for ongoing maintenance/support.

Additional context
See also #168 for a similar request for files.

@bobsira
Copy link
Contributor

bobsira commented Aug 13, 2024

  1. On your query for Event Log entries to also emit the Event Source name as appears in the Windows Event Log. This is possible in Log Monitor. This PR should contain the fix for the ask. Include Event Source Name in EventLog Event Log entries #182
  2. On your second query, I believe we can also have a better filtering mechanism based on Event Source name if this is something that customers would desire and would help out with your logging experience. The team will look into it and get back to you.

cc @CharityKathure @iankingori

@kamranayub
Copy link

kamranayub commented Sep 12, 2024

+1 to this. Use case: I have a ASP.NET Framework app I'm modernizing and it's running in a container. I love that I can wrap it in LogMonitor and see my app logs (NLog file logger), but I don't love that I have to subscribe to the full Application event log, and I can't filter down to only the ASP.NET 4.0.30319.0 source. It doesn't help that it's a Warning level and not an Error if my app throws a fatal error either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants