From d408b129e414ffd641622ba7ac543cbdb0e90ffc Mon Sep 17 00:00:00 2001 From: Judy Joseph Date: Fri, 20 Nov 2020 08:51:32 -0800 Subject: [PATCH 1/2] Move frr logs from syslog to /var/log/frr/*.log --- files/image_config/logrotate/logrotate.d/rsyslog | 4 ++-- files/image_config/rsyslog/rsyslog.d/00-sonic.conf | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/files/image_config/logrotate/logrotate.d/rsyslog b/files/image_config/logrotate/logrotate.d/rsyslog index 76737ba14420..792e3e9a2d57 100644 --- a/files/image_config/logrotate/logrotate.d/rsyslog +++ b/files/image_config/logrotate/logrotate.d/rsyslog @@ -28,8 +28,8 @@ /var/log/syslog /var/log/teamd.log /var/log/telemetry.log -/var/log/quagga/bgpd.log -/var/log/quagga/zebra.log +/var/log/frr/bgpd.log +/var/log/frr/zebra.log /var/log/swss/sairedis.rec /var/log/swss/swss.rec { diff --git a/files/image_config/rsyslog/rsyslog.d/00-sonic.conf b/files/image_config/rsyslog/rsyslog.d/00-sonic.conf index 455fe89fd2bf..ad6ca440628a 100644 --- a/files/image_config/rsyslog/rsyslog.d/00-sonic.conf +++ b/files/image_config/rsyslog/rsyslog.d/00-sonic.conf @@ -1,15 +1,12 @@ ## Quagga rules -if $programname == ["bgp#quagga", - "bgp#watchquagga", - "bgp#zebra"] - then { - /var/log/quagga/zebra.log +if re_match($programname, "bgp[0-9]*#(frr|zebra)") then { + /var/log/frr/zebra.log stop } -if $programname == "bgp#bgpd" then { - /var/log/quagga/bgpd.log +if re_match($programname, "bgp[0-9]*#bgpd") then { + /var/log/frr/bgpd.log stop } From 5df3028acf1fbc9f01f26d69ca6e1e95503c1b3b Mon Sep 17 00:00:00 2001 From: Judy Joseph Date: Wed, 25 Nov 2020 12:58:47 -0800 Subject: [PATCH 2/2] Updates for handling the staticd|watchfrr logs. --- files/image_config/rsyslog/rsyslog.d/00-sonic.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/rsyslog/rsyslog.d/00-sonic.conf b/files/image_config/rsyslog/rsyslog.d/00-sonic.conf index ad6ca440628a..bc69af74b8b3 100644 --- a/files/image_config/rsyslog/rsyslog.d/00-sonic.conf +++ b/files/image_config/rsyslog/rsyslog.d/00-sonic.conf @@ -1,6 +1,6 @@ ## Quagga rules -if re_match($programname, "bgp[0-9]*#(frr|zebra)") then { +if re_match($programname, "bgp[0-9]*#(frr|zebra|staticd|watchfrr)") then { /var/log/frr/zebra.log stop }