Configure memory buffer for "messages" destination

Hello, I'm trying to configure the syslog-ng service to write the log messages to disk every 10 messages instead of every one.

I tried to configure via the /etc/syslog-ng/syslog-ng.conf file as below, but it didn't work, the messages keep getting written every time:

@version: 3.8

options {

template rtlog {
template_escape(no); };

source src { file("/proc/kmsg"); unix-stream("/dev/log"); };

destination messages { file("/var/log/messages"); };

log { source(src); destination(messages); };

@include "/etc/syslog-ng.d/*.conf"