[syslog-ng]Issue with Macros & 1.6.0rc2

Dan Edwards syslog-ng@lists.balabit.hu
Thu, 17 Apr 2003 18:02:07 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_003A_01C3050B.75F140B0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

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.

 


------=_NextPart_000_003A_01C3050B.75F140B0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I am having some strange problems that I can not seem =
to
resolve with syslog-ng and macro use.&nbsp; I am sure it is simple and I =
am
just over looking it.&nbsp; When I try and use the $YEAR, $MONTH, $DAY,
$FACILITY, $LEVEL and several other macros nothing is outputted.&nbsp; =
Example:</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>destination d_cisco { =
file(&quot;/var/log/cisco-$YEAR.$MONTH.$DAY.log&quot;);
}</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>The file that it creates is:</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&#8220;/var/log/cisco-&#8230;log&#8221;</span></font><=
/p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>This holds true for usage of template command in the =
file
call.&nbsp; If I format it with those macros a blank space is all that =
is
entered.&nbsp; If I put a &#8220;\n&#8221; on the end of the last macro =
it
erases all the output for the line and makes the entire line blank. =
&nbsp;Example:</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>destination d_cisco { =
file(&quot;/var/log/cisco.log&quot;
template(&#8220;$YEAR-$MONTH-$DAY $LEVEL $MSG\n&#8221;)); =
}</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>The output is</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&#8220;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; &#8220;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>If I do not put the \n on the end only the MSG macro =
will
output.&nbsp; Any input is greatly appreciated. </span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Debian 3.0r1</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Syslog-ng-1.6.0rc2</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Libol-0.3.9</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Dan Edwards</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Network Specialist</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>A. Duda &amp; Sons, Inc.</span></font></p>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;</span></font></p>

</div>

</body>

</html>

------=_NextPart_000_003A_01C3050B.75F140B0--