[syslog-ng] Log rotate without log rotate.

Alexander Clouter ac56 at soas.ac.uk
Fri Mar 16 16:08:14 CET 2007


Hi,

Bruno Vieira <giuliapo at gmail.com> [20070316 14:59:00 +0000]:
>
> Hi there.
> 
> I have a question and at the same time i almost know that it must exist a
> way of doing this.
> 
> [snipped]
> 
> This way I would have a log rotation without using log rotate that normally
> it copies the file content to a new one and than syslog-ng starts writing on
> an empty one.
> 
I might have missed something but whats wrong with something like:

====
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.html#macros

> Tell me what you think about this.
> 
shear craziness :)

Cheers

Alex


More information about the syslog-ng mailing list