ASP.NET Core logging trim lines
I created a new ASP.NET Core WebAPI project with the latest VS2017.
The logger truncates all lines, so the messages are completely useless.
I cannot find a way to disable it.
This is what I have (using the SERILOG file logger):
Startup:
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
loggerFactory.AddFile("bin\\Debug\\server.log", LogLevel.Debug);
app.UseMvc();
}
AppSettings:
{
"Logging": {
"IncludeScopes": true,
"LogLevel": {
"Default": "Info"
}
}
}
This is what I get (Console)
Hosting environment: Development
Content root path: D:\Daten\ASP\EBK\src\Kollektor
Now listening on: http://X:8000
Application started. Press Ctrl+C to shut down.
info: Microsoft.AspNetCore.Server.Kestrel[17]
Connection id "0HL4SRDM7TAGL" bad request data: "Invalid request line: GET /kollektor/api/datapoints HT..."
Microsoft.AspNetCore.Server.Kestrel.BadHttpRequestException: Invalid request line: GET /kollektor/api/datapoints HT...
This is what I get (file logger)
2017-05-17T06:15:59.8697799+02:00 [INF] Connection id ""0HL4SRDM7TAGL"" bad request data: ""Invalid request line: GET /kollektor/api/datapoints HT..."" (86f1a409)
Microsoft.AspNetCore.Server.Kestrel.BadHttpRequestException: Invalid request line: GET /kollektor/api/datapoints HT...
Which setting am I missing?
+3
source to share
No one has answered this question yet
Check out similar questions: