0

I have a default asp.net core application from API template.
I write log message in GetWeatherForecast action and I see the message both in Debug and LoggingTests - ASP.NET Core Web Server categories of output window (Show output from).

enter image description here

Yet messages logged by NServcieBus message handler are shown only in Debug.

I'd expect that section LoggingTests - ASP.NET Core Web Server just shows all the messages coming form the same process, however, NServiceBus case disproves this assumption.

When you start multiple applications with IIS Express profile you do not have console output, and Debug shows output from any of these apps. This is quite annoying. I was looking for the messages to be grouped under the corresponding section, but as I said, messages from NServiceBus do not arrive there.

Does anyone know what are the criteria for the message to be shown in ASP.NET Core Server section?

Pavel Voronin
  • 13,503
  • 7
  • 71
  • 137
  • Are you using the NServiceBus.Extensions.Hosting extension? If yes have you upgraded to 1.1.0 already? That package provides first party integration with Microsoft.Extensions.Logging for NServiceBus – Daniel Marbach Aug 17 '20 at 09:45
  • @DanielMarbach No difference. But the log messages are coming from hosted service. – Pavel Voronin Aug 17 '20 at 11:29
  • Ok then your question is more related to ASP.NET Core and Microsoft.Extensions.Logging configuration I guess. From an NServiceBus perspective when you have that extension everything should be properly setup to use the MS logging infrastructure – Daniel Marbach Aug 17 '20 at 13:17
  • @DanielMarbach Again and again I am stepping on the same rake. The issue was caused that when no browser is launched, IIS Express does not start the host even if hosted service is registered. And if browser is launched, and HTTPS url is defined, port must be withing [44300-44398 range](https://stackoverflow.com/questions/19417219/ssl-connection-connection-reset-with-iisexpress/24957146#24957146). – Pavel Voronin Aug 18 '20 at 08:03
  • Yeah sorry I'm probably not much help here since this is not exactly my area of expertise – Daniel Marbach Aug 20 '20 at 13:10

0 Answers0