@version:3.0

options {
	chain_hostnames(no);
	flush_lines(0);
	stats_freq(0);
	flush_lines(0);
	log_msg_size(65536);
};

source src {
	internal();
	unix-stream("/dev/log");
};

source kernel {
        file("/proc/kmsg" program_override("kernel"));
};

filter f_turris_iptables {
	not match(".*turris[^:]*: .*" value(MESSAGE)) or not level(debug);
};

destination messages {
	file("/var/log/messages" suppress(5) template("${ISODATE} ${PRIORITY} ${PROGRAM}[${PID}]: ${MSGONLY}\n") log_fifo_size(256));
};

log {
	source(src);
	source(kernel);
	filter(f_turris_iptables);
	destination(messages);
};

include "/etc/syslog-ng.d/";
