github.com/argoproj/argo-cd/v2@v2.10.5/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    # Get logs for a specific container within the pods
    45    argocd app logs my-app -c my-container
    46    
    47    # Get previously terminated container logs
    48    argocd app logs my-app -p
    49  ```
    50  
    51  ### Options
    52  
    53  ```
    54    -c, --container string    Optional container name
    55        --filter string       Show logs contain this string
    56    -f, --follow              Specify if the logs should be streamed
    57        --group string        Resource group
    58    -h, --help                help for logs
    59        --kind string         Resource kind
    60        --name string         Resource name
    61        --namespace string    Resource namespace
    62    -p, --previous            Specify if the previously terminated container logs should be returned
    63        --since-seconds int   A relative time in seconds before the current time from which to show logs
    64        --tail int            The number of lines from the end of the logs to show
    65        --until-time string   Show logs until this time
    66  ```
    67  
    68  ### Options inherited from parent commands
    69  
    70  ```
    71        --auth-token string               Authentication token
    72        --client-crt string               Client certificate file
    73        --client-crt-key string           Client certificate key file
    74        --config string                   Path to Argo CD config (default "/home/user/.config/argocd/config")
    75        --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")
    76        --core                            If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server
    77        --grpc-web                        Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2.
    78        --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.
    79    -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)
    80        --http-retry-max int              Maximum number of retries to establish http connection to Argo CD server
    81        --insecure                        Skip server certificate and domain verification
    82        --kube-context string             Directs the command to the given kube-context
    83        --logformat string                Set the logging format. One of: text|json (default "text")
    84        --loglevel string                 Set the logging level. One of: debug|info|warn|error (default "info")
    85        --plaintext                       Disable TLS
    86        --port-forward                    Connect to a random argocd-server port using port forwarding
    87        --port-forward-namespace string   Namespace name which should be used for port forwarding
    88        --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")
    89        --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")
    90        --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")
    91        --server string                   Argo CD server address
    92        --server-crt string               Server certificate file
    93        --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")
    94  ```
    95  
    96  ### SEE ALSO
    97  
    98  * [argocd app](argocd_app.md)	 - Manage applications
    99