<br>Hi Alex. Thanks you for your considerations.<br><br>But the problem here is that the device that will be logging have memory restrictions.<br>So, I want a log that acts as a fifo. And every time a new message comes, the oldest one gets out.
<br><br>With log rotate I can&#39;t guarantee that the size of the log keeps in a acceptable interval like 100 - 120 KB. Because if I get a ton of info dumped to the log file within a small amount of time, I&#39;ll still overshoot the maximum file size.
<br><br>I would like to have only one file per destination (ex: auth.log) and keep that file within 100 - 120 KB or 100 lines, per example. I want it to be circular... to be like a FIFO.<br><br><br>What do you think?<br>I have a solution.. but I think there can be a better one. My solution is: having a midlle program between syslog-ng and the destination file. And for every message received, the program would verify if the destination file (
p.e. auth.log) already has 100 lines. If so, deleted the last line, make all others one ENTER down and that append the new line to the beginning of the file.<br><br>But this seems to be a very &quot;manual&quot; solution...
<br><br><br>Best regards,<br>Bruno.<br><font size="2"></font><br><br><br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">====<br>destination d_cheese {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file(&quot;/var/log/cheese/$R_YEAR$R_MONTH$R_DAY.log&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;perm(0644));<br>};<br>====<br><br>Have a look at the follow macro expansions for more fun:<br><br><a href="http://www.balabit.com/products/syslog_ng/reference-2.0/syslog-ng.html/index.html#macros">
http://www.balabit.com/products/syslog_ng/reference-2.0/syslog-ng.html/index.html#macros</a><br><br>&gt; Tell me what you think about this.<br>&gt;<br>shear craziness :)<br><br>Cheers<br><br>Alex<br>_______________________________________________
<br>syslog-ng maillist&nbsp;&nbsp;-&nbsp;&nbsp;<a href="mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</a><br><a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
<br>Frequently asked questions at <a href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a><br><br></blockquote></div><br>