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

Serge Torop syslog-ng@lists.balabit.hu
Wed, 3 Dec 2003 16:20:09 +0300 (MSK)


On Wed, 3 Dec 2003, Serge Torop wrote:

> 
> On Tue, 2 Dec 2003, Balazs Scheidler wrote:
> 
> > 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.
> 
> I'm try syslog-ng 1.6.0rc4:
> 
> # /usr/local/sbin/syslog-ng -V
> syslog-ng 1.6.0rc4
> 
> 
> The problem remained.
> 
> My conf:
> 
> destination d_daemons { file("/var/log/daemons/daemons-info.$MONTH.$YEAR"); };
> 
> 
> # ls -1 /var/log/daemons
> 
> daemons-info.10.2003
> daemons-info.11.2003
> daemons-info.12.2003 - !!


Sorry, wrong dir. This is correct:

# ls -1 /var/log/fetchmail

fetchmaillog.03.12.2003
fetchmaillog.31.12.2002 - !!!



-- 
Serge P. Torop
St.Petersburg, Russia