diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 05719127be4e..c4fda5be3137 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -276,6 +276,7 @@ func NewApplicationLogsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co sinceSeconds int64 untilTime string filter string + container string ) var command = &cobra.Command{ Use: "logs APPNAME", @@ -304,6 +305,7 @@ func NewApplicationLogsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co SinceSeconds: sinceSeconds, UntilTime: &untilTime, Filter: &filter, + Container: container, }) if err != nil { log.Fatalf("failed to get pod logs: %v", err) @@ -344,6 +346,7 @@ func NewApplicationLogsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co command.Flags().Int64Var(&sinceSeconds, "since-seconds", 0, "A relative time in seconds before the current time from which to show logs") command.Flags().StringVar(&untilTime, "until-time", "", "Show logs until this time") command.Flags().StringVar(&filter, "filter", "", "Show logs contain this string") + command.Flags().StringVar(&container, "container", "", "Optional container name") return command } diff --git a/docs/user-guide/commands/argocd_app_logs.md b/docs/user-guide/commands/argocd_app_logs.md index 6e025259e4bf..88eaeb8beedc 100644 --- a/docs/user-guide/commands/argocd_app_logs.md +++ b/docs/user-guide/commands/argocd_app_logs.md @@ -9,6 +9,7 @@ argocd app logs APPNAME [flags] ### Options ``` + --container string Optional container name --filter string Show logs contain this string --follow Specify if the logs should be streamed --group string Resource group