[syslog-ng]Change slash to other char in variable PROGRAM

Jozef Drahovsky syslog-ng@lists.balabit.hu
Thu, 25 Nov 2004 14:39:37 +0100


Hello,
I have small problem.
In experimental pc have universal configuration:   
destination logex { file( 
"/var/log-ng/$YEAR-$MONTH-$DAY/$HOST-$PROGRAM.txt"  perm(0664) 
dir_owner(www) dir_perm(0775) create_dirs(yes) ); };
All function is right. (syslog-ng-1.6.0.r3  ....  syslog-ng-1.6.5)

Problem accured when variable $PROGRAM contains slash "/"
How change slash and other notprinted charactres to "_"

Example:
TASK:   92  ??  Is     0:01.76 /usr/sbin/cron
LOGFILE: /var/log-ng/2004-11-25/test-/usr/sbin/cron.txt    --->  
/var/log-ng/2004-11-25/test-usr_sbin_cron.txt

Jozef Drahovsky