mirror of https://gerrit.osmocom.org/libosmocore
vty: Provide logging set-log-mask, deprecate set log mask
There are no other commands on the set, log and mask level, create a simple set-log-mask command and deprecate the old way.
This commit is contained in:
parent
e40549a0ae
commit
146d1d3c35
|
@ -185,9 +185,10 @@ DEFUN(logging_level,
|
|||
|
||||
DEFUN(logging_set_category_mask,
|
||||
logging_set_category_mask_cmd,
|
||||
"logging set log mask MASK",
|
||||
"logging set-log-mask MASK",
|
||||
LOGGING_STR
|
||||
"Decide which categories to output.\n")
|
||||
"Set the logmask of this logging target\n"
|
||||
"The logmask to use\n")
|
||||
{
|
||||
struct log_target *tgt = osmo_log_vty2tgt(vty);
|
||||
|
||||
|
@ -198,6 +199,14 @@ DEFUN(logging_set_category_mask,
|
|||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
ALIAS_DEPRECATED(logging_set_category_mask,
|
||||
logging_set_category_mask_old_cmd,
|
||||
"logging set log mask MASK",
|
||||
LOGGING_STR
|
||||
"Decide which categories to output.\n"
|
||||
"Log commands\n" "Mask commands\n" "The logmask to use\n");
|
||||
|
||||
|
||||
DEFUN(diable_logging,
|
||||
disable_logging_cmd,
|
||||
"logging disable",
|
||||
|
@ -560,6 +569,7 @@ void logging_vty_add_cmds(const struct log_info *cat)
|
|||
install_element_ve(&logging_use_clr_cmd);
|
||||
install_element_ve(&logging_prnt_timestamp_cmd);
|
||||
install_element_ve(&logging_set_category_mask_cmd);
|
||||
install_element_ve(&logging_set_category_mask_old_cmd);
|
||||
|
||||
/* Logging level strings are generated dynamically. */
|
||||
logging_level_cmd.string = log_vty_command_string(cat);
|
||||
|
|
Loading…
Reference in New Issue