How to configure rsyslog inside docker image centos 8

855 Views Asked by At

I'm building a docker image based on centos that contains a postfix configuration. However, it's not working correctly, so I'm trying to debug it. I want to enable rsyslog, so I can see the logging.

However, the default rsyslog.conf does not log anything. What is the proper way to set-up local logging for rsyslog in a centos8 docker image?

1

There are 1 best solutions below

0
On

This mini config seems to work

module(
    load="imuxsock"
    SysSock.Use="on"
)

#### RULES ####

mail.* /var/log/mail

*.* /var/log/messages