[syslog-ng]sync question, feature request

Thierry Besancon Thierry.Besancon@prism.uvsq.fr
11 Jan 2001 15:35:35 +0100


Dixit Wiktor Wodecki <wodecki@wapme-systems.de> (le Thu, 11 Jan 2001 14:41:18 +0100) :

» I've got another question, I haven't really looked at the 1.5 tree yet,
» but I think about making patch to syslog-ng which would include the
» strftime functions. I want to be able to use things like $Y/$m/$d in the
» destination file path, this would effectively eliminate logrotation
» scripts. Is there such an effort already in work or is this feature
» planned?

Well. This is already coded if i'm not wrong. Use $YEAR, $MONTH, $DAY

For example :

destination all { 
        file("/var/log/messages-$YEAR$MONTH$DAY" create_dirs(yes)); 
};

Nevertheless, I'm not sure that is really what you (and I) want. In my
example, it creates files with the *dates of the syslog messages* what
is different from the date of the day they are received. In my case,
it seems I have syslog clients with unsynchronized clocks and I
already have messages-20010704 for example (4th july 2001 !).

        Thierry