Hello everyone, I have noticed that it is not possible to put commands after a "stop" anymore. In such a case we have the following error : "STOP is followed by unreachable statements". It has been confirmed severa times namely through this post : https://github.com/rsyslog/rsyslog/issues/3668
In version 8.22.0, I used this feature to stop parsing the rsyslog.conf file standard directives and use the dynamic ones set by my program. I did this because, until my program is not started, I want rsyslog to log everything the standard way. Here is how I did it: - Inside the standard rsyslog.conf file, I just replaced *$IncludeConfig /etc/rsyslog.d/*.conf* with a volatile memory temporary folder *$IncludeConfig /tmp/syslog/*.conf* Thus 1. Until my program is not running, There is no conf files inside *$IncludeConfig /tmp/syslog/*.conf * and so rsyslog uses the standard way #### RULES (Not processed when my program is runnning)#### # Log all kernel messages to the console. # Logging much else clutters up the screen. #kern.* /dev/console # Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.debug;mail.none;authpriv.none;cron.none /var/log/messages # The authpriv file has restricted access. authpriv.* /var/log/secure # Log all the mail messages in one place. mail.* /var/log/maillog that # Log cron stuff cron.* /var/log/cron # Everybody gets emergency messages *.emerg :omusrmsg:* # Save news errors of level crit and higher in a special file. uucp,news.crit /var/log/spooler # Save boot messages also to boot.log local7.* /var/log/boot.log 2. My program populates *$IncludeConfig /tmp/syslog/ *with several conf files for different targets and facilities. At the end, it creates a file only containing "STOP" command that prevents rsyslog to continue processing the standard rules It's a shame that "STOP is followed by unreachable statements" is an error and not a warning... Thus I could have let my program as it is ;-)... Anyway, I'm opened to change the way I did. Any suggestion would be welcomed Best regards, Thomas _______________________________________________ rsyslog mailing list https://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.