From fc1018bb57bc09fba6b484003e937c9423aad8b9 Mon Sep 17 00:00:00 2001 From: Otavio Rodolfo Piske Date: Tue, 8 Jun 2021 15:05:03 +0200 Subject: [PATCH] Removed the deprecated --logging-level option (issue #2000) --- pkg/cmd/run.go | 5 ----- pkg/cmd/run_test.go | 12 ------------ 2 files changed, 17 deletions(-) diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go index b097cf1885..56ac7d02b6 100644 --- a/pkg/cmd/run.go +++ b/pkg/cmd/run.go @@ -90,7 +90,6 @@ func newCmdRun(rootCmdOptions *RootCmdOptions) (*cobra.Command, *runCmdOptions) cmd.Flags().Bool("use-flows", true, "Write yaml sources as Flow objects in the integration custom resource") cmd.Flags().String("profile", "", "Trait profile used for deployment") cmd.Flags().StringArrayP("trait", "t", nil, "Configure a trait. E.g. \"-t service.enabled=false\"") - cmd.Flags().StringArray("logging-level", nil, "Configure the logging level. e.g. \"--logging-level org.apache.camel=DEBUG\"") cmd.Flags().StringP("output", "o", "", "Output format. One of: json|yaml") cmd.Flags().Bool("compression", false, "Enable storage of sources and resources as a compressed binary blobs") cmd.Flags().StringArray("resource", nil, "Add a resource") @@ -135,7 +134,6 @@ type runCmdOptions struct { Secrets []string `mapstructure:"secrets" yaml:",omitempty"` Repositories []string `mapstructure:"maven-repositories" yaml:",omitempty"` Traits []string `mapstructure:"traits" yaml:",omitempty"` - LoggingLevels []string `mapstructure:"logging-levels" yaml:",omitempty"` Volumes []string `mapstructure:"volumes" yaml:",omitempty"` EnvVars []string `mapstructure:"envs" yaml:",omitempty"` // Deprecated: PropertyFiles has been deprecated in 1.5 @@ -592,9 +590,6 @@ func (o *runCmdOptions) updateIntegrationCode(c client.Client, sources []string, } } } - for _, item := range o.LoggingLevels { - integration.Spec.AddConfiguration("property", "logging.level."+item) - } for _, item := range o.Configs { if config, parseErr := ParseConfigOption(item); parseErr == nil { if applyConfigOptionErr := ApplyConfigOption(config, &integration.Spec, c, namespace, o.Compression); applyConfigOptionErr != nil { diff --git a/pkg/cmd/run_test.go b/pkg/cmd/run_test.go index 1d9192fc6a..c32a0c57db 100644 --- a/pkg/cmd/run_test.go +++ b/pkg/cmd/run_test.go @@ -154,18 +154,6 @@ func TestRunLabelWrongFormatFlag(t *testing.T) { assert.NotNil(t, err) } -func TestRunLoggingLevelFlag(t *testing.T) { - runCmdOptions, rootCmd, _ := initializeRunCmdOptions(t) - _, err := test.ExecuteCommand(rootCmd, cmdRun, - "--logging-level", "lev1", - "--logging-level", "lev2", - integrationSource) - assert.Nil(t, err) - assert.Len(t, runCmdOptions.LoggingLevels, 2) - assert.Equal(t, "lev1", runCmdOptions.LoggingLevels[0]) - assert.Equal(t, "lev2", runCmdOptions.LoggingLevels[1]) -} - func TestRunLogsFlag(t *testing.T) { runCmdOptions, rootCmd, _ := initializeRunCmdOptions(t) _, err := test.ExecuteCommand(rootCmd, cmdRun, "--logs", integrationSource)