From 3c1f92018bfa6a14ccf6eb70ccd93f38e54bf83f Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Tue, 11 Jan 2022 15:39:11 -0300 Subject: [PATCH] lib: rotate log file supplied by command line Call `zlog_file_rotate` for command file lines as well otherwise on `SIGUSR1` the old descriptor will still be used and no new log file will be created for the rotation. Signed-off-by: Rafael Zalamena --- lib/log_vty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/log_vty.c b/lib/log_vty.c index 682c9ea372..3f9240aa55 100644 --- a/lib/log_vty.c +++ b/lib/log_vty.c @@ -159,6 +159,7 @@ void zlog_rotate(void) { zlog_file_rotate(&zt_file); zlog_file_rotate(&zt_filterfile.parent); + zlog_file_rotate(&zt_file_cmdline); hook_call(zlog_rotate); }