]> 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)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Fri, 15 Jul 2022 19:28:38 +0000 (19:28 +0000)
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>
(cherry picked from commit 3c1f92018bfa6a14ccf6eb70ccd93f38e54bf83f)

lib/log_vty.c

index 621949ab57f74eb16e14277c7933ef8567bf605c..d50ac7eadebec973fb09ebff53a11c3d5371ba87 100644 (file)
@@ -138,6 +138,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);
 }