]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: rotate log file supplied by command line
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 11 Jan 2022 18:39:11 +0000 (15:39 -0300)
committerRafael F. Zalamena <rzalamena@opensourcerouting.org>
Thu, 3 Mar 2022 21:28:08 +0000 (18:28 -0300)
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 <rzalamena@opensourcerouting.org>
lib/log_vty.c

index 682c9ea372b36ed14187dba1ba1c3b3a7b84b770..3f9240aa55def7dcc0149f1031f8edce8469c747 100644 (file)
@@ -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);
 }