/var/log/switchd.log {
        size 500k
        sharedscripts
        delaycompress
        missingok
        compress
        rotate 14
        nocreate

        postrotate
                # switchd can log with the file: method, or the default syslog:
                # method, so we might need to signal either switchd or rsyslogd.
                # To simplify things, we use lsof to get the PID, normally
                # for the .1 file that was just rotated. Check both, just in
                # case. if using file logging, switchd might not be running, so
                # exit 0 at end. If rsyslog is doing HUP processing, it might
                # have it open either; /var/log/switchd might not yet be
                # created, so hide lsof errors
                pid=$(lsof -t /var/log/switchd.log /var/log/switchd.log.1\
                      2>/dev/null)
                [ -n "$pid" ] && kill -HUP $pid
                exit 0
        endscript
}
