docker-postfix icon indicating copy to clipboard operation
docker-postfix copied to clipboard

Can't customize rsyslog

Open RussianFox opened this issue 3 years ago • 1 comments

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
}

RussianFox avatar Aug 07 '22 15:08 RussianFox

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!

bokysan avatar Sep 06 '22 07:09 bokysan

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.

lbarbaglia avatar Sep 06 '23 18:09 lbarbaglia

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/.

bokysan avatar Oct 27 '23 16:10 bokysan