EventSourceLogger always shows errors in output window
See original GitHub issueI created a basic Asp.NetCore 2.1 web application from the VS 2017 template and configured logging like this:
public static IWebHostBuilder CreateWebHostBuilder(string[] args) {
return WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.ConfigureLogging((ctx, lb) => {
lb.AddEventSourceLogger();
});
}
Whenever the events from the Microsoft-Extensions-Logging provider are consumed each log entry gets reported like this example in the output window:
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 GET http://localhost:44321/Contact
The parameters to the Event method do not match the parameters to the WriteEvent method. This may cause the event to be displayed incorrectly.
This happens when using PerView, the Diagnostic Events viewer window in VS 2017, or when using Microsoft.Diagnostics.EventFlow.
I can still get the events, but I wonder if they are incomplete. For instance, in the example above, the request path “http://localhost:44321/Contact” is not included in the log entry. However, I would expect it to be logged.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
WPF Binding Errors always show in the output window
I am working on a huge WPF project that has no binding errors. I usually track them down using Snoop, for more info...
Read more >Logging in .NET Core and ASP.NET Core
Logs created with the default logging providers are displayed: In Visual Studio. In the Debug output window when debugging. In the ASP.
Read more >The option "Always show Error List if build finishes with ...
When you right-click in the titlebar of the “Error List” window, ... If you turn that setting on, and always show the Output...
Read more >Output window does not show output although no errors ...
so as the title explains when I run the program the output window popup the code start running but it remains black with...
Read more >Setting up Serilog in ASP.NET Core 3
This means we'll still see warnings and errors from the framework, but not informational log events. Streamlined request logging. Our log output ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This seems to be a bug in how EventSource arguments get validated. Moving to 3.0.0 to track.
cc @muratg
Let’s close it. See dotnet/coreclr#20493