[syslog-ng]Variables with file destination
   
    Kenneth Webber
     
    syslog-ng@lists.balabit.hu
       
    Wed, 03 Dec 2003 18:35:13 +0000
    
    
  
Question:
The variables in my file destination are not working.
	file("/var/log/syslogng/$YEAR_$MONTH_$DAY_$WEEKDAY_$HOST.log");
I expect my log files to be something like:
	/var/log/syslogng/2003_12_03_WED_10.2.2.2.log
Instead they are:
	/var/log/syslogng/10.2.2.2.log
I had it working at one point but not any longer. Has anyone seen this?
I am using libol-0.3.11+20030915 and syslog-ng 1.6.0rc4.
My config is:
# syslog-ng.conf
options {
long_hostnames(yes);		use_dns(yes);		use_fqdn(yes);
dns_cache(yes);		dns_cache_size(500);	dns_cache_expire(3600);
dns_cache_expire_failed(3600);	check_hostname(yes);	keep_hostname(yes);
chain_hostnames(yes);		log_msg_size(8192);	sync(10);
log_fifo_size(2048);		time_reopen(10);	use_time_recvd(yes);
};
source src {
        udp();		internal();
};
destination syslogfile {
        file(
                "/var/log/syslogng/$YEAR_$MONTH_$DAY_$WEEKDAY_$HOST.log.log"
                create_dirs(yes)
                owner("bob")
                group("other")
                perm(644)
                remove_if_older(3600)
        );
};
log { source(src); destination(syslogfile); };
_________________________________________________________________
Take advantage of our best MSN Dial-up offer of the year — six months 
@$9.95/month. Sign up now! http://join.msn.com/?page=dept/dialup