question

KyrianWillis-4250 avatar image
0 Votes"
KyrianWillis-4250 asked azure-cxp-api edited

Cannot find entries in Logs

I'm trying to find log entries from my application in the portal. This is a .net core 3 web application. Below is the setup in my code:

82822-image.png


This is how I am calling the logging:

82806-image.png


I see the logging appear in the Log Stream:

82823-image.png
82841-image.png


I need to view this information in the Logs using a query. I've set up Diagnostic settings:

82824-image.png
82831-image.png


Looking in the logs I've changed the scope to the application, the blob storage, and the log analytics work space I set up. I'm not able to find the message that appears in the Log Stream anywhere.

Does anyone have any ideas about what I'm missing?


azure-monitorazure-webapps-monitoring
image.png (20.5 KiB)
image.png (18.5 KiB)
image.png (121.6 KiB)
image.png (90.6 KiB)
image.png (180.6 KiB)
image.png (129.1 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
0 Votes"
ryanchill answered

Hi @KyrianWillis-4250,

I do want to make the distinction that AzureWebAppDiagnostics doesn't gain you Azure Monitor logs support. It, depending on configuration, writes to either a text file or blob storage; see https://docs.microsoft.com/en-US/dotnet/core/extensions/logging-providers#azure-app-service. You can configure AzureFileLoggerOptions or AzureBlobLoggerOptions but by default, configs are pulled from your app.settings.json, see https://github.com/dotnet/aspnetcore/blob/c925f99cddac0df90ed0bc4a07ecda6b054a0b02/src/Logging.AzureAppServices/src/AzureAppServicesLoggerFactoryExtensions.cs#L32.

Having said that, unfortunately, AppServiceAppLogs doesn't yet support .NET Core, here are the currently supported types. I do know AppServiceConsoleLogs support for .NET Core is currently being worked on.

Regards,
Ryan








5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.