mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 10:37:29 +00:00
lib: add hook for show logging
CLI
... so additional targets can print their state. Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
9c2aa91921
commit
ba9256d2d0
@ -34,6 +34,7 @@
|
|||||||
#define ZLOG_MAXLVL(a, b) MAX(a, b)
|
#define ZLOG_MAXLVL(a, b) MAX(a, b)
|
||||||
|
|
||||||
DEFINE_HOOK(zlog_rotate, (), ());
|
DEFINE_HOOK(zlog_rotate, (), ());
|
||||||
|
DEFINE_HOOK(zlog_cli_show, (struct vty * vty), (vty));
|
||||||
|
|
||||||
static const int log_default_lvl = LOG_DEBUG;
|
static const int log_default_lvl = LOG_DEBUG;
|
||||||
|
|
||||||
@ -194,6 +195,8 @@ DEFUN_NOSH (show_logging,
|
|||||||
vty_out(vty, "Record priority: %s\n",
|
vty_out(vty, "Record priority: %s\n",
|
||||||
(zt_file.record_priority ? "enabled" : "disabled"));
|
(zt_file.record_priority ? "enabled" : "disabled"));
|
||||||
vty_out(vty, "Timestamp precision: %d\n", zt_file.ts_subsec);
|
vty_out(vty, "Timestamp precision: %d\n", zt_file.ts_subsec);
|
||||||
|
|
||||||
|
hook_call(zlog_cli_show, vty);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,8 @@ extern void log_show_syslog(struct vty *vty);
|
|||||||
DECLARE_HOOK(zlog_rotate, (), ());
|
DECLARE_HOOK(zlog_rotate, (), ());
|
||||||
extern void zlog_rotate(void);
|
extern void zlog_rotate(void);
|
||||||
|
|
||||||
|
DECLARE_HOOK(zlog_cli_show, (struct vty * vty), (vty));
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user