github.com/argoproj/argo-cd/v3@v3.2.1/docs/user-guide/commands/argocd_app_logs.md (about)

     1  # `argocd app logs` Command Reference
     2  
     3  ## argocd app logs
     4  
     5  Get logs of application pods
     6  
     7  ```
     8  argocd app logs APPNAME [flags]
     9  ```
    10  
    11  ### Examples
    12  
    13  ```
    14    # Get logs of pods associated with the application "my-app"
    15    argocd app logs my-app
    16    
    17    # Get logs of pods associated with the application "my-app" in a specific resource group
    18    argocd app logs my-app --group my-group
    19    
    20    # Get logs of pods associated with the application "my-app" in a specific resource kind
    21    argocd app logs my-app --kind my-kind
    22    
    23    # Get logs of pods associated with the application "my-app" in a specific namespace
    24    argocd app logs my-app --namespace my-namespace
    25    
    26    # Get logs of pods associated with the application "my-app" for a specific resource name
    27    argocd app logs my-app --name my-resource
    28    
    29    # Stream logs in real-time for the application "my-app"
    30    argocd app logs my-app -f
    31    
    32    # Get the last N lines of logs for the application "my-app"
    33    argocd app logs my-app --tail 100
    34    
    35    # Get logs since a specified number of seconds ago
    36    argocd app logs my-app --since-seconds 3600
    37    
    38    # Get logs until a specified time (format: "2023-10-10T15:30:00Z")
    39    argocd app logs my-app --until-time "2023-10-10T15:30:00Z"
    40    
    41    # Filter logs to show only those containing a specific string
    42    argocd app logs my-app --filter "error"
    43    
    44    # Filter logs to show only those containing a specific string and match case
    45    argocd app logs my-app --filter "error" --match-case
    46    
    47    # Get logs for a specific container within the pods
    48    argocd app logs my-app -c my-container
    49    
    50    # Get previously terminated container logs
    51    argocd app logs my-app -p
    52  ```
    53  
    54  ### Options
    55  
    56  ```
    57    -c, --container string    Optional container name
    58        --filter string       Show logs contain this string
    59    -f, --follow              Specify if the logs should be streamed
    60        --group string        Resource group
    61    -h, --help                help for logs
    62        --kind string         Resource kind
    63    -m, --match-case          Specify if the filter should be case-sensitive
    64        --name string         Resource name
    65        --namespace string    Resource namespace
    66    -p, --previous            Specify if the previously terminated container logs should be returned
    67        --since-seconds int   A relative time in seconds before the current time from which to show logs
    68        --tail int            The number of lines from the end of the logs to show
    69        --until-time string   Show logs until this time
    70  ```
    71  
    72  ### Options inherited from parent commands
    73  
    74  ```
    75        --argocd-context string           The name of the Argo-CD server context to use
    76        --auth-token string               Authentication token; set this or the ARGOCD_AUTH_TOKEN environment variable
    77        --client-crt string               Client certificate file
    78        --client-crt-key string           Client certificate key file
    79        --config string                   Path to Argo CD config (default "/home/user/.config/argocd/config")
    80        --controller-name string          Name of the Argo CD Application controller; set this or the ARGOCD_APPLICATION_CONTROLLER_NAME environment variable when the controller's name label differs from the default, for example when installing via the Helm chart (default "argocd-application-controller")
    81        --core                            If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server
    82        --grpc-web                        Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2.
    83        --grpc-web-root-path string       Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. Set web root.
    84    -H, --header strings                  Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers)
    85        --http-retry-max int              Maximum number of retries to establish http connection to Argo CD server
    86        --insecure                        Skip server certificate and domain verification
    87        --kube-context string             Directs the command to the given kube-context
    88        --logformat string                Set the logging format. One of: json|text (default "json")
    89        --loglevel string                 Set the logging level. One of: debug|info|warn|error (default "info")
    90        --plaintext                       Disable TLS
    91        --port-forward                    Connect to a random argocd-server port using port forwarding
    92        --port-forward-namespace string   Namespace name which should be used for port forwarding
    93        --prompts-enabled                 Force optional interactive prompts to be enabled or disabled, overriding local configuration. If not specified, the local configuration value will be used, which is false by default.
    94        --redis-compress string           Enable this if the application controller is configured with redis compression enabled. (possible values: gzip, none) (default "gzip")
    95        --redis-haproxy-name string       Name of the Redis HA Proxy; set this or the ARGOCD_REDIS_HAPROXY_NAME environment variable when the HA Proxy's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis-ha-haproxy")
    96        --redis-name string               Name of the Redis deployment; set this or the ARGOCD_REDIS_NAME environment variable when the Redis's name label differs from the default, for example when installing via the Helm chart (default "argocd-redis")
    97        --repo-server-name string         Name of the Argo CD Repo server; set this or the ARGOCD_REPO_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-repo-server")
    98        --server string                   Argo CD server address
    99        --server-crt string               Server certificate file
   100        --server-name string              Name of the Argo CD API server; set this or the ARGOCD_SERVER_NAME environment variable when the server's name label differs from the default, for example when installing via the Helm chart (default "argocd-server")
   101  ```
   102  
   103  ### SEE ALSO
   104  
   105  * [argocd app](argocd_app.md)	 - Manage applications
   106