From 6d9ecbcfd84f1398cf2de22bf7afc6036f6441c3 Mon Sep 17 00:00:00 2001 From: judyjoseph <53951155+judyjoseph@users.noreply.github.com> Date: Thu, 10 Dec 2020 08:44:34 -0800 Subject: [PATCH] Move frr logs from syslog to /var/log/frr/*.log (#5988) - Why I did it Move frr logs from syslog from the directory /var/log/quagga/.log to /var/log/frr/log - How I did it Updated the rsyslog config files. - How to verify it Verified the logs come into the file zebra.log and bgpd.log in the DIR /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..bc69af74b8b3 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|staticd|watchfrr)") 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 }