Skip to content

Commit

Permalink
Removed the deprecated --logging-level option (issue apache#2000)
Browse files Browse the repository at this point in the history
  • Loading branch information
orpiske committed Jun 8, 2021
1 parent 4dcbe4a commit fc1018b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions pkg/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
12 changes: 0 additions & 12 deletions pkg/cmd/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fc1018b

Please sign in to comment.