'What should i prefer to log everything, including web app and app service?

I need to log everything: application running on app service and app service itself. I see two options App Service Logging and Diagnostic Settings. What should I prefer? And Do I need to make any code change in order to log the app service? And what should I do in order to log the application running on it? I just need an overview to make sure I don't mess up.



Solution 1:[1]

  • In App service logs, we can directly query for logs.
  • Azure App Service Diagnostic settings feature is now generally available. Logs are sent from Windows and Linux App Service to Storage Accounts, Event Hubs, or Log Analytics. This capability helps development and operations teams capture and analyze important data about their apps
  • Diagnostic settings are used to configure a resource's streaming export of platform logs and metrics to a destination of our choice.
  • The logs can be exported to other resources such as "Log Analytics workspace," "storage account," "event hub," and Send to Partner solution.

Refer App Service Logging

enter image description here

Enable diagnostics logging for apps in Azure App Service

Please refer SO Thread for more information

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 HarshithaVeeramalla-MT