Question: I upgraded a Web API project from ASP.NET Core 1.x to ASP.NET Core 2.0 with very minimal code changes.

When running the WebAPI the command prompt opens up like normal.

However, every single info message is duplicated.

Is this an ASP.NET Core bug or is this an issue on my end after upgrading?

**UPDATE:**

I was doing the following in the Startup.cs Configure method:

```
    loggerFactory.AddConsole(Configuration.GetSection("Logging"));
    loggerFactory.AddDebug();

```

When I remove it there are no duplicates. Is this not needed anymore?

Answer: 
`WebHost.CreateDefaultBuilder` sets up a lot of the *conventional* stuff for you, to save the same code having to be generated for each individual ASP.NET Core 2 project (as it was in ASP.NET Core 1.x).

You can see the code for `WebHost.CreateDefaultBuilder` [here](https://github.com/dotnet/aspnetcore/blob/release/2.1/src/DefaultBuilder/src/WebHost.cs#L150). For your particular scenario, if you look a little [further down](https://github.com/dotnet/aspnetcore/blob/release/2.1/src/DefaultBuilder/src/WebHost.cs#L183) in the source code, you'll see the following:

```
logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
logging.AddConsole();
logging.AddDebug();

```

Due to this, you no longer need to add this code yourself. In doing so, it gets added twice and this ends up doing the logging *twice*.

If you want a more detailed walkthrough of these changes, Andrew Lock has a good [write-up](https://andrewlock.net/exploring-program-and-startup-in-asp-net-core-2-preview1-2/) of how this works. He also digs into some of the details of how to override some of these defaults, etc. Note that this write-up is based on ASP.NET Core 2 preview 1, but things are more or less the same in the final version.
I was having the same issue: using NLog, all info was duplicated and recorded that way. For me, what solved the problem was to remove the `loggerFactory.AddNLog()` from `Configure` at `Startup.cs`. I'm using Core 2.0.