I have the following statement in my /etc/rsyslog.conf
:
# This one is the template to generate the log filename dynamically
$template DynFile,"/var/log/proxy/%$year%/%$month%/%$now%.log"
if $fromhost-ip == '192.168.1.1' then *.* ?DynFile
The idea is to split a local and remote logs into separate dirs and files.
rsyslog daemon starts without any errors but expected logs are not created. If I replace "if" statement with simple *.* ?DynFile
then logs are populated, but of course then they aren't splitted.