Hi there. Thank you for your opinion.<br><br>I have found that this really is a feature well needed by many embeddedsystems.<br><br>I will implement or reuse a component that makes this kind of rotation... the conclusion i got was that what I really needed was a file that would implement a buffer... so, the only way is making a daemon that does this for me.. and it may or may not save it&#39;s buffer on a destination file.
<br><br>It would be great if Linux had a driver that would do this on it&#39;s own. Or at least a driver on the project openwrt (linux for embedded systems).<br><br>Well, I have the solution now :)<br><br>Thanks you all for your contribution.
<br>Many regards,<br>Bruno.<br><br><br><br><br><br><div><span class="gmail_quote">On 17 Mar 2007 16:25:32 +0000, <b class="gmail_sendername">Bryan Henderson</b> &lt;<a href="mailto:bryanh@giraffe-data.com">bryanh@giraffe-data.com
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt;I have a solution.. but I think there can be a better one. My solution is:
<br>&gt;having a midlle program between syslog-ng and the destination file. And for<br>&gt;every message received, the program would verify if the destination file<br>&gt;(p.e. auth.log) already has 100 lines. If so, deleted the last line, make
<br>&gt;all others one ENTER down and that append the new line to the beginning of<br>&gt;the file.<br><br>It would probably be better to maintain the file in circular fashion:<br>allocate 8K in the beginning, then write messages from beginning to
<br>end, then wrap around and write from the beginning again, always<br>keeping track (in a header of the file) of where you last wrote.&nbsp;&nbsp;Use<br>a special program that understands this file format to translate it to<br>a regular stream that you can use normally.
<br><br>Lots of systems have programs that do this.&nbsp;&nbsp;I looked on Freshmeat for<br>a publicly available one and found &#39;cupyvei&#39;, though I don&#39;t much care<br>for the details of this implementation.&nbsp;&nbsp;It would be easy to write a
<br>program of your own.<br><br>I also think a built in log destination of this type<br>(e.g. &quot;file_circular&quot;) would be an excellent addition to syslog-ng.&nbsp;&nbsp;I<br>think this type of logging is a common requirement.
<br><br>--<br>Bryan Henderson&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; San Jose, California<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>