logs CLI command reference

Detailed information on the logs CLI command

Description

Get Dapr sidecar logs for an application.

Supported platforms

Usage

  1. dapr logs [flags]

Flags

NameEnvironment VariableDefaultDescription
—app-id, -aAPP_IDThe application id for which logs are needed
—help, -hPrint this help message
—kubernetes, -ktrueGet logs from a Kubernetes cluster
—namespace, -ndefaultThe Kubernetes namespace in which your application is deployed
—pod-name, -pThe name of the pod in Kubernetes, in case your application has multiple pods (optional)

Examples

  1. # Get logs of sample app from target pod in custom namespace
  2. dapr logs -k --app-id sample --pod-name target --namespace custom

Warning messages

This command can issue warning messages.

Root certificate renewal warning

If the mtls root certificate deployed to the Kubernetes cluster expires in under 30 days the following warning message is displayed:

  1. Dapr root certificate of your Kubernetes cluster expires in <n> days. Expiry date: <date:time> UTC.
  2. Please see docs.dapr.io for certificate renewal instructions to avoid service interruptions.

Last modified June 19, 2023: Merge pull request #3565 from dapr/aacrawfi/skip-secrets-close (b1763bf)