%if %%getVar('activer_reception_logs', 'non') == 'non'
# all messages go in local branch
if $programname == "eole-schedule" then {
    action(type="omfile" file="/var/log/rsyslog/local/eole-schedule/eole-schedule.log")
    stop
}
%else
# all messages from localhost go in local branch
if $programname == 'eole-schedule' and $fromhost-ip startswith '127' then {
    action(type="omfile" file="/var/log/rsyslog/local/eole-schedule/eole-schedule.log")
    stop
}

template(name="remote_eole_schedule" type="string"
         string="/var/log/rsyslog/remote/%hostname:::secpath-replace%/eole-schedule/eole-schedule.log"
)

if $programname == 'eole-schedule' then {
    action(type="omfile" dynaFile="remote_eole_schedule")
    stop
}
%end if
