-
Notifications
You must be signed in to change notification settings - Fork 4.9k
EventSource improvements for text logging #12730
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
Comments
|
|
What scale of payload do you need to log? |
For exceptions do you have any particular expectations for what the serialized format is? |
For in-process listeners, I'd like to be able to pass Exception instance and strings of arbitrary length around. The problem is that it doesn't work with ETW. |
The context of this issue is that EventSource events were getting serialized as a string so they could be put into a text log. That requires the runtime to convert the exception into a string of some form. If you want to pass around exception object instances and get references back as-is from an in-proc sink that sounds like a scenario DiagnosticsSource was aiming to handle. If you also didn't want to use DiagnosticsSource for whatever reason but you did want the sink to receive an instance of arbitrary Exceptions then we should probably revisit the overall scenario because that wasn't the trajectory I thought we were on. |
Let me clarify where I'm coming from. Even if we add support for console text logging to EventSource we would still need a way to forward events from EventSource to ILogger for scenarios where the library is used in ASP.NET Core environment. So you are right that this is not a request for purely "text logging" improvement, more something we would need to have if EventSource would be the only logging mechanism used by the library. |
Gotcha - I just opened dotnet/coreclr#24773 which I think is a little more targeted at your aim. |
I got another one to add about object lifetime, thread safety and testability. I've spent the last day fighting with EventSource and EventListener trying to write a set of unit tests that run in parallel. Even when creating objects that look like they don't mutate global state, it seems like they still do. I think it's a massive design flaw of the current object model to do things implicitly like that. |
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process. This process is part of our issue cleanup automation. |
This issue will now be closed since it had been marked |
From an email thread with Krzysztof Cwalina and Pavel Krymets we were discussing that EventSource has rough edges when you try to use it for textual logging:
The text was updated successfully, but these errors were encountered: