@version:3.5
@include "scl.conf"

options {
	flush_lines (0);
	time_reopen (10);
	log_fifo_size (1000);
	chain_hostnames (off);
	use_dns (no);
	use_fqdn (no);
	create_dirs (yes);
	keep_hostname (no);
};

source s_remote { udp(port(514)); };

destination d_socket {
pipe("/var/run/syslog-ng.socket" template("$UNIXTIME|$SOURCEIP|$MSGHDR $MESSAGE\n") template-escape(yes) flags(no-multi-line));
};

destination d_all { file("/var/log/remote/$R_YEAR/$R_MONTH/$R_YEAR-$R_MONTH-$R_DAY.log" flags(no-multi-line)); };

destination d_all_simple {
file("/var/log/remote/messages.log" template("$UNIXTIME|$SOURCEIP|$MSGHDR $MESSAGE\n") template-escape(yes) flags(no-multi-line));
};

log { source(s_remote); destination(d_all); };
log { source(s_remote); destination(d_all_simple); };
log { source(s_remote); destination(d_socket); };

# Source additional configuration files (.conf extension only)
@include "/etc/syslog-ng/conf.d/*.conf"

# vim:ft=syslog-ng:ai:si:ts=4:sw=4:et:
