[syslog-ng]$YEAR/$MONTH/$DAY generates always 2002/12/31

Balazs Scheidler syslog-ng@lists.balabit.hu
Tue, 2 Dec 2003 20:14:46 +0100


On Tue, Dec 02, 2003 at 12:36:05PM +0100, Piotr Woliński wrote:
> Hello,
> 
> I have PLD Linux kernel 2.4.20 and syslog-ng-1.6.0-0.rc3.2
> I put into into syslog-ng.conf lines (for test purpose):
> 
> source net      { udp(); };
> destination hosts {
>     file("/var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/$FACILITY"
>         owner(root) group(root) perm(0600) dir_perm(0700)
>     create_dirs(yes)); };
> log {source(net); destination(hosts); };
> 
> 
> Now i can see directiories like that:
> /var/log/hosts/localhost/2003/2003/12/01
> /var/log/hosts/localhost/2003/2003/12/02
> that's OK.
> 
> But also:
> /var/log/hosts/localhost/2002/12/31

as the year is not included in incoming messages syslog-ng tries to guess a
year based on current time and the received time. as there was a change in
this area in 1.6.0rc4 try that version and check whether it fixes your
problem.

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1