aspnet / MetaPackages

[Archived] NuGet meta packages. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
211 stars 109 forks source link

Update WebHost.cs #257

Closed PonchoPowers closed 6 years ago

PonchoPowers commented 6 years ago

Only add console and debug logging when the environment is development.

Eilon commented 6 years ago

@DamianEdwards / @davidfowl / @muratg / @JunTaoLuo - do we plan to take any action on this PR?

Eilon commented 6 years ago

My personal view is that we should close it because we want the Console logger to write out in scenarios such as Azure App Services, but I'm no expert.

Also, we generally avoid doing any logic based on the deployment environment. (Not that we never do, but it's rare.)

muratg commented 6 years ago

Agreed. @Matthew-Bonner thanks for the PR, but like Eilon said, there are scenarios where this is useful. We'll be keeping it in. It's easy to workaround this if it's causing any issues.