Question: I'm trying to print a log message in ASP.NET Core this way: 

```
Console.WriteLine( "Hello World!" );

loggerFactory.MinimumLevel = LogLevel.Debug;
loggerFactory.AddConsole( LogLevel.Debug );
var logger = loggerFactory.CreateLogger("Startup");
logger.LogWarning( "Hi!" );

```

Where can I see this message?

The Output window doesn't contain this message.

If I run the project as Web, it runs the `dnx` console where I can see the message, but it is not convenient.

If I run project as IIS Express I don't see the console, or the message.

Is there way to view the message in Visual Studio?

Answer: 
You can use the [`Debug` listener](https://github.com/aspnet/Logging/tree/master/src/Microsoft.Extensions.Logging.Debug) to achieve what you want:

```
"dependencies": {
  "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final"
}

```

---

```
Console.WriteLine( "Hello World!" );

loggerFactory.MinimumLevel = LogLevel.Debug;
loggerFactory.AddDebug( LogLevel.Debug );
var logger = loggerFactory.CreateLogger("Startup");
logger.LogWarning( "Hi!" );

```
None of the other answers addresses the actual question: "How can we see those messages when running the project with IIS Express?". So, I decided to add my own, I hope it helps somebody.

The usual console window does not show up when you choose IIS Express. But you can still see those messages by following the below steps.

1. Look for the `Output` window in Visual Studio. If you already have it, skip the next step
2. Goto View-menu > Output or press `Ctrl + W,O`. The output window will show up.
3. In the output window, change the dropdown to *"<-your-project-name-> ASP.NET Core Web Server"* or something similar.
4. You should be able to see those messages here.

[![enter image description here](https://i.stack.imgur.com/KldEB.png)](https://i.stack.imgur.com/KldEB.png)

I am using VS 2019, the above steps can differ based on your IDE version.