I want to limit the size of log file, if the size has been exceeded, the old messages will be dropped silently, just like a ring buffer.
And I think the output channel does not meet my requirment.
So, what can I do?
For more, I find a clog patch for syslogd.
My answer only for rsyslog.
There are many ways to make circular log, see this.
For example.
local7.* /var/log/messages
Then use omprog to merge those ways into rsyslog.
local7.* action(type="omprog" binary="/path/ways")
We can use many ways as above to record the logs into a circular buffer.
One more sentence, because the circular format is so customized, which needs an according tool to load the content. I think this is why rsyslog does not support such formal plugin.