dotnet / dotnet/aspnetcore

AddAzureWebAppDiagnostics() depends on AddConsole().

Open
#17,844 6 comments 0 reactions 0 assignees View on GitHub
affected-very-few area-networking enhancement feature-azure severity-nice-to-have
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

Moved from https://github.com/aspnet/AspNetCore.Docs/issues/16095 by @SidShetye

All extension methods referenced here are in C#, .net core 3.0 within Program.cs

It appears that removing `logging.AddConsole();` breaks `logging.AddAzureWebAppDiagnostics();`. One would expect each logger to be independent but from our testing we found that `AddAzureWebAppDiagnostics()` depends on `AddConsole()`.

Further more, going to the portal UI -> web app -> App Service logs -> Application Logging -> File System (enable) makes the `AddAzureWebAppDiagnostics()` redundant because linux AppService now automatically saves console logs to the webapp file system.

In addition, the documented folders are wrong on linux. There is no `Application` folder generated within `LogFiles`.

I suggest a documentation do-over on the Azure WebApp + Linux + .NET Core 3.x combination.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.