ASP.NET Core logging truncates lines

Viewed 416

I created a new ASP.NET Core WebAPI project with latest VS2017.

The logger truncates all lines, so that the messages are totally useless.

I cannot find a way to disable it.

This is what I have (using 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...

What setting am I missing?

0 Answers
Related