Muokkaa

Jaa


Application Logging in Azure Container Apps

Azure Container Apps provides two types of application logging categories:

You can view the log streams in near real-time in the Azure portal or CLI. For more options to store and monitor your logs, see Logging options.

Container console Logs

Console logs originate from the stderr and stdout messages from the containers in your container app and Dapr sidecars. When you implement logging in your application, you can troubleshoot problems and monitor the health of your app.

Tip

Instrumenting your code with well-defined log messages can help you to understand how your code is performing and to debug issues. To learn more about best practices refer to Design for operations.

System logs

Azure Container Apps generates system logs to inform you about the status of service-level events. The log messages include the following information:

  • Successfully created dapr component
  • Successfully updated dapr component
  • Error creating dapr component
  • Successfully mounted volume
  • Error mounting volume
  • Successfully bound Domain
  • Auth enabled on app
  • Creating authentication config
  • Auth config created successfully
  • Setting a traffic weight
  • Creating a new revision:
  • Successfully provisioned revision
  • Deactivating Old revisions
  • Error provisioning revision

System logs emit the following messages:

Source Type Message
Dapr Info Successfully created dapr component <component-name> with scope <dapr-component-scope>
Dapr Info Successfully updated dapr component <component-name> with scope <component-type>
Dapr Error Error creating dapr component <component-name>
Volume Mounts Info Successfully mounted volume <volume-name> for revision <revision-scope>
Volume Mounts Error Error mounting volume <volume-name>
Domain Binding Info Successfully bound Domain <domain> to the container app <container app name>
Authentication Info Auth enabled on app. Creating authentication config
Authentication Info Auth config created successfully
Traffic weight Info Setting a traffic weight of <percentage>% for revision <revision-name\>
Revision Provisioning Info Creating a new revision: <revision-name>
Revision Provisioning Info Successfully provisioned revision <name>
Revision Provisioning Info Deactivating Old revisions since 'ActiveRevisionsMode=Single'
Revision Provisioning Error Error provisioning revision <revision-name>. ErrorCode: <[ErrImagePull]|[Timeout]|[ContainerCrashing]>

Next steps