Make sure that you have the rsyslog package installed and that it is enabled otherwise your log files will be empty. Some newer distributions might not install this package by default as they use journald logging by default.
Centos/AlmaLinux/RHEL
yum install rsyslog
systemctl enable rsyslog --now
Debian/Ubuntu
apt-get install rsyslog
systemctl enable rsyslog --now