mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 20:13:53 +00:00
lib: add 'log immediate-mode' cli
Add a cli to control immediate-output mode for logs and debugs. Add this to the user docs also. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
42ddefe816
commit
7c945dff61
@ -188,6 +188,12 @@ Basic Config Commands
|
|||||||
This command clears all current filters in the log-filter table. Can be
|
This command clears all current filters in the log-filter table. Can be
|
||||||
daemon independent.
|
daemon independent.
|
||||||
|
|
||||||
|
|
||||||
|
.. clicmd:: log immediate-mode
|
||||||
|
|
||||||
|
Use unbuffered output for log and debug messages; normally there is
|
||||||
|
some internal buffering.
|
||||||
|
|
||||||
.. clicmd:: service password-encryption
|
.. clicmd:: service password-encryption
|
||||||
|
|
||||||
Encrypt password.
|
Encrypt password.
|
||||||
|
@ -647,6 +647,18 @@ DEFPY (show_log_filter,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Enable/disable 'immediate' mode, with no output buffering */
|
||||||
|
DEFPY (log_immediate_mode,
|
||||||
|
log_immediate_mode_cmd,
|
||||||
|
"[no] log immediate-mode",
|
||||||
|
NO_STR
|
||||||
|
"Logging control"
|
||||||
|
"Output immediately, without buffering")
|
||||||
|
{
|
||||||
|
zlog_set_immediate(!no);
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
void log_config_write(struct vty *vty)
|
void log_config_write(struct vty *vty)
|
||||||
{
|
{
|
||||||
bool show_cmdline_hint = false;
|
bool show_cmdline_hint = false;
|
||||||
@ -775,4 +787,5 @@ void log_cmd_init(void)
|
|||||||
install_element(CONFIG_NODE, &log_filter_clear_cmd);
|
install_element(CONFIG_NODE, &log_filter_clear_cmd);
|
||||||
install_element(CONFIG_NODE, &config_log_filterfile_cmd);
|
install_element(CONFIG_NODE, &config_log_filterfile_cmd);
|
||||||
install_element(CONFIG_NODE, &no_config_log_filterfile_cmd);
|
install_element(CONFIG_NODE, &no_config_log_filterfile_cmd);
|
||||||
|
install_element(CONFIG_NODE, &log_immediate_mode_cmd);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user