Cannot find entries in Logs

Kyrian Willis 1 Reputation point
2021-03-30T13:42:47.363+00:00

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 Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,326 Reputation points Microsoft Employee Moderator
    2021-04-01T18:03:56.503+00:00

    Hi @Kyrian Willis ,

    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://learn.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


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.