[syslog-ng] strange problem when use "_" in the destination log file name

Arnold Wang arnold.wang at inovis.com
Thu Aug 4 01:01:05 CEST 2005


Hi,
I'm running into a strange problem with syslog-ng 1.6.8 on RHEL 4. In my
configuration file, I have the following local log file defined:
destination d_file { file("/var/syslog-
ng/HOSTS/$HOST/$YEAR/$MONTH/$HOST_$MONTH$DAY.log" owner(root) group
(root) perm(0600) dir_perm(0700) create_dirs(yes)); }; 
However, the log file generated by the syslog-ng for today is named
"0803.log", which is different than "hostname_0803.log" as I expected. 
I tried using escape "\" so it looks like "$HOST\_$MONTH$DAY.log" and it
didn't help at all. This problem actually doesn't bother me that much. I
changed "_" to "-" or ".", it worked. I'm just curious about this. 



More information about the syslog-ng mailing list