Hi Alex. Thanks you for your considerations. But the problem here is that the device that will be logging have memory restrictions. So, I want a log that acts as a fifo. And every time a new message comes, the oldest one gets out. With log rotate I can'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'll still overshoot the maximum file size. 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. What do you think? 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. But this seems to be a very "manual" solution... Best regards, Bruno. ====
destination d_cheese { file("/var/log/cheese/$R_YEAR$R_MONTH$R_DAY.log" perm(0644)); }; ====
Have a look at the follow macro expansions for more fun:
http://www.balabit.com/products/syslog_ng/reference-2.0/syslog-ng.html/index...
Tell me what you think about this.
shear craziness :)
Cheers
Alex _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html