How does syslog-ng handles flush_lines(0)?

I wanted to make sure my syslog-ng was doing async logging.

Reading through the documentation I see the flush_lines() option for file() destinations, if unspecified, will use the global default. Then I see that the global setting defaults to 0 but it doesn't explain what that means.

Is it going to do synchronous logging when set to 0? is it going to buffer an unlimited number of lines (flushing just every flush_timeout() number of seconds)? is it going to bite me?


Solution 1:

Given a default config, with flush_lines set to 0, syslog-ng will act on each message it receives individually.

It will not buffer any number of lines but will log them one at a time (at least in terms of line buffering; obviously other config options will affect what actually happens to each message).

Thus, assuming that I'm correctly interpreting "async logging" to mean "non-batched" logging, then no, I don't think flush_lines(0) would bite you.

Source: mailing-list discussion with syslog-ng creator: http://comments.gmane.org/gmane.comp.syslog-ng/9205