Hi all, I'm using syslog-ng 2.0.9 as a central logging server with destination like this: destination r_messages { file ("/logpool/logs/$DAY$MONTH$YEAR/$HOST_$DAY$MONTH$YEAR$_$HOUR"); }; But I get this: #ls /logpool/logs/05012009 0501200910 HOST is not expanded and _ before $HOUR is missing . What is special about underscore ? While using destination r_messages { file ("/logpool/logs/$DAY$MONTH$YEAR/$HOST-$DAY$MONTH$YEAR$-$HOUR"); }; everything is fine: # ls /logpool/logs/05012009/ 10.96.47.233-05012009-10 I would prefer to use an underscore if I could. Thank you, Stefan
Hi,
I'm using syslog-ng 2.0.9 as a central logging server with destination like this: destination r_messages { file ("/logpool/logs/$DAY$MONTH$YEAR/$HOST_$DAY$MONTH$YEAR$_$HOUR"); };
But I get this: #ls /logpool/logs/05012009 0501200910
HOST is not expanded and _ before $HOUR is missing . What is special about underscore ?
While using destination r_messages { file ("/logpool/logs/$DAY$MONTH$YEAR/$HOST-$DAY$MONTH$YEAR$-$HOUR"); }; everything is fine:
# ls /logpool/logs/05012009/ 10.96.47.233-05012009-10
I would prefer to use an underscore if I could.
Use ${VARIABLE1}_${VARIABLE2} and so on. Regards, Sandor -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
I would prefer to use an underscore if I could.
Use ${VARIABLE1}_${VARIABLE2} and so on.
with $[VARIABLE] like: destination r_messages { file ("/logpool/logs/$DAY$MONTH$YEAR/$[HOST]_$[DAY]$[MONTH]$[YEAR]_$[HOUR]"); }; # ls /logpool/logs/05012009/ [HOST]_[DAY][MONTH][YEAR]_[HOUR] any thoughts why ?:-) Stefan
Hi,
I would prefer to use an underscore if I could.
Use ${VARIABLE1}_${VARIABLE2} and so on.
with $[VARIABLE] like: destination r_messages { file ("/logpool/logs/$DAY$MONTH$YEAR/$[HOST]_$[DAY]$[MONTH]$[YEAR]_ $[HOUR]"); }; # ls /logpool/logs/05012009/ [HOST]_[DAY][MONTH][YEAR]_[HOUR]
${} is the proper format just like in sh, perl, etc. Regards, Sandor -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
participants (2)
-
Geller, Sandor (IT)
-
Stefan Varga