-
Notifications
You must be signed in to change notification settings - Fork 840
Closed
Milestone
Description
I 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.