summaryrefslogtreecommitdiffstats
path: root/redhat
diff options
context:
space:
mode:
authorDave Olson <olson@cumulusnetworks.com>2017-07-28 06:01:18 +0200
committerDave Olson <olson@cumulusnetworks.com>2017-07-31 21:53:01 +0200
commita7c9d77a08bcf6f3a9529bcf98f7d7cf758a0764 (patch)
treeb9856f3494f861cd3e354a3d78877d2ac920d497 /redhat
parentMerge pull request #881 from donaldsharp/ping_traceroute (diff)
downloadfrr-a7c9d77a08bcf6f3a9529bcf98f7d7cf758a0764.tar.xz
frr-a7c9d77a08bcf6f3a9529bcf98f7d7cf758a0764.zip
Switch to using syslog for logging as the default
Switch to using syslog as the default logging mechanism, rather than the log file mechanism. Send SIGHUP to syslog (any process with syslog in the name) if they have files open in /var/log/frr/* (for debian, using lsof). For redhat, add sending HUP to any of the pids in /var/run/*syslog*pid, for /var/log/frr/frr.log Updated logrotate.d/frr to handle all the new daemons for debian; redhat already had them. Continue to send SIGUSR1 to all running frr daemons even when syslog is in use, in case logging has been switched from file to syslog or vice versa. For debian, accumulate all the PIDs and use a single kill command. Add /etc/rsyslogd.d/45-frr.conf to have all frr daemons (and tag frr) logs go to /var/log/frr/frr.log. If other syslog daemons are used, logs will go to default log file. Signed-off-by: Dave Olson <olson@cumulusnetworks.com>
Diffstat (limited to 'redhat')
-rw-r--r--redhat/frr.logrotate8
1 files changed, 8 insertions, 0 deletions
diff --git a/redhat/frr.logrotate b/redhat/frr.logrotate
index f43a86efe..25a558778 100644
--- a/redhat/frr.logrotate
+++ b/redhat/frr.logrotate
@@ -1,3 +1,11 @@
+/var/log/frr/frr.log {
+ notifempty
+ missingok
+ postrotate
+ /bin/kill -HUP `cat /var/run/*syslog*.pid 2> /dev/null` 2> /dev/null || true
+ endscript
+}
+
/var/log/frr/zebra.log {
notifempty
missingok