diff options
| author | David Lamparter <equinox@diac24.net> | 2021-04-08 14:29:18 +0200 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2021-06-18 20:56:53 +0200 | 
| commit | ba9256d2d089034e66d7c06734a4495afba9513d (patch) | |
| tree | 485b0cd3c2425fdcfef5d454f092930d8c842aad /lib/log_vty.c | |
| parent | 9c2aa9192198769264df3d127332358b73983aed (diff) | |
lib: add hook for `show logging` CLI
... so additional targets can print their state.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/log_vty.c')
| -rw-r--r-- | lib/log_vty.c | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/log_vty.c b/lib/log_vty.c index aa1888a9e9..7057a06c51 100644 --- a/lib/log_vty.c +++ b/lib/log_vty.c @@ -34,6 +34,7 @@  #define ZLOG_MAXLVL(a, b) MAX(a, b)  DEFINE_HOOK(zlog_rotate, (), ()); +DEFINE_HOOK(zlog_cli_show, (struct vty * vty), (vty));  static const int log_default_lvl = LOG_DEBUG; @@ -194,6 +195,8 @@ DEFUN_NOSH (show_logging,  	vty_out(vty, "Record priority: %s\n",  		(zt_file.record_priority ? "enabled" : "disabled"));  	vty_out(vty, "Timestamp precision: %d\n", zt_file.ts_subsec); + +	hook_call(zlog_cli_show, vty);  	return CMD_SUCCESS;  }  | 
