I am having some strange problems that I can not seem to resolve with syslog-ng and macro use.  I am sure it is simple and I am just over looking it.  When I try and use the $YEAR, $MONTH, $DAY, $FACILITY, $LEVEL and several other macros nothing is outputted.  Example:

 

destination d_cisco { file("/var/log/cisco-$YEAR.$MONTH.$DAY.log"); }

 

The file that it creates is:

 

“/var/log/cisco-…log”

 

This holds true for usage of template command in the file call.  If I format it with those macros a blank space is all that is entered.  If I put a “\n” on the end of the last macro it erases all the output for the line and makes the entire line blank.  Example:

 

destination d_cisco { file("/var/log/cisco.log" template(“$YEAR-$MONTH-$DAY $LEVEL $MSG\n”)); }

 

The output is

 

“         “

 

If I do not put the \n on the end only the MSG macro will output.  Any input is greatly appreciated.

 

Debian 3.0r1

Syslog-ng-1.6.0rc2

Libol-0.3.9

 

Dan Edwards

Network Specialist

A. Duda & Sons, Inc.