Skip to content

Report back what changes were made to logging and require at least one option set#503

Merged
mozzieongit merged 4 commits intomainfrom
report-back-logging-change
Mar 9, 2026
Merged

Report back what changes were made to logging and require at least one option set#503
mozzieongit merged 4 commits intomainfrom
report-back-logging-change

Conversation

@mozzieongit
Copy link
Member

Changes:

  • Require at least one of the options to be present (otherwise the command doesn't do anything)
  • Enable providing multiple trace targets in a single comma-separated argument to --trace-targets
  • Print what has changed.

I got confused that cascade debug change-logging stated that it changed the logging, but I didn't give it any options, so I wondered what it changed to. Turns out it didn't actually change anything.

This PR changes the behaviour to require at least one of the options to be provided, and log what the changes submitted to the server are.

Arguably, now that at least one of the options is required, the verbosity is not really required anymore.

I opted to only set level to required_unless_present_any ..., as not to confuse users with clap's error message stating that both would be required:

error: the following required arguments were not provided:
  --level <LEVEL>
  --trace-targets <TRACE_TARGETS>

Usage: cascade debug change-logging --level <LEVEL> --trace-targets <TRACE_TARGETS>

For more information, try '--help'.

Instead, it only shows --level as required, as that is the option most commonly used I assume.

error: the following required arguments were not provided:
  --level <LEVEL>

Usage: cascade debug change-logging --level <LEVEL>

For more information, try '--help'.

Additionally, the help text states that "at least on option of 'level' or 'trace-targets' is required".

@mozzieongit mozzieongit requested a review from bal-e March 6, 2026 14:52
@mozzieongit mozzieongit self-assigned this Mar 6, 2026
@mozzieongit mozzieongit added the enhancement New feature or request label Mar 6, 2026
Copy link
Member

@ximon18 ximon18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement.

@mozzieongit mozzieongit merged commit 9ee4af4 into main Mar 9, 2026
8 checks passed
@mozzieongit mozzieongit deleted the report-back-logging-change branch March 9, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants