Can't customize rsyslog
Hi! Nice work! But, can you add ability to customize rsyslog?
String in rsyslog.conf after your changes:
include(file="/etc/rsyslog.d/*.conf" mode="optional")
But it not work, because in your config, higher than this line:
if $syslogseverity <= '6' then {
........................
stop
}
rsyslog.conf needs to be dynamic, as to have the ability to switch between JSON and text via environment variables.
If you have any good suggestion how to do it, please feel free to submit a patch!
Sorry to comment this issue after such long time but maybe you can remove the stop at the end of the if ? It'll enable us to add new configuration in /etc/rsyslog.d/ without impacting the current configuration
if $syslogseverity <= '6' then {
........................
}
I also need to customize rsyslog to send the logs to a MySQL database and for now I add the same rsyslog.conf file as you but without the stop.
This has been resolved in v4.0.0: rsyslog.conf does not have a stop any more and will include everything from /etc/rsyslog.d/.