Skip to content

Commit

Permalink
verbosity command name revisit
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Sep 11, 2023
1 parent 6ca38df commit ed7358f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cylc/flow/scripts/cylc.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def get_version(long=False):
'start':
'cylc start & cylc restart have been replaced by cylc play',
'set-verbosity':
'cylc set-verbosity has been replaced by cylc log-level',
'cylc set-verbosity has been replaced by cylc verbosity',
'warranty':
'cylc warranty has been replaced by cylc help license',
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""cylc log-level [OPTIONS] ARGS
"""cylc verbosity [OPTIONS] ARGS
Set the Python logging level of a running scheduler.
Set the logging severity level of a running scheduler.
Messages at or above the chosen level are logged. If you choose
WARNING (say) only WARNING and CRITICAL messages will be logged.
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ cylc.command =
remove = cylc.flow.scripts.remove:main
report-timings = cylc.flow.scripts.report_timings:main [report-timings]
scan = cylc.flow.scripts.scan:cli
log-level = cylc.flow.scripts.log_level:main
show = cylc.flow.scripts.show:main
set = cylc.flow.scripts.set:main
stop = cylc.flow.scripts.stop:main
subscribe = cylc.flow.scripts.subscribe:main
verbosity = cylc.flow.scripts.verbosity:main
workflow-state = cylc.flow.scripts.workflow_state:main
tui = cylc.flow.scripts.tui:main
trigger = cylc.flow.scripts.trigger:main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------
# Test "cylc log-level"
# Test "cylc verbosity"
. "$(dirname "$0")/test_header"
set_test_number 6

# Test illegal log level
TEST_NAME="${TEST_NAME_BASE}-bad"
run_fail "$TEST_NAME" cylc log-level duck quack
run_fail "$TEST_NAME" cylc verbosity duck quack
grep_ok 'InputError: Illegal logging level, duck' "${TEST_NAME}.stderr"

# Test good log level
Expand All @@ -37,10 +37,10 @@ __FLOW__
run_ok "${TEST_NAME}-validate" cylc validate "$WORKFLOW_NAME"
workflow_run_ok "${TEST_NAME}-run" cylc play --pause "$WORKFLOW_NAME"

run_ok "$TEST_NAME" cylc log-level DEBUG "$WORKFLOW_NAME"
run_ok "$TEST_NAME" cylc verbosity DEBUG "$WORKFLOW_NAME"
LOG_SCAN_GREP_OPTS="-E" \
log_scan "${TEST_NAME}-grep" "${WORKFLOW_RUN_DIR}/log/scheduler/log" 5 1 \
'\[command] actioned.*set_log_level'
'\[command] actioned.*verbosity'

cylc stop "$WORKFLOW_NAME"
purge

0 comments on commit ed7358f

Please sign in to comment.