<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3354" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=555193915-10092008><FONT face=Arial size=2>I was going to use
ISODATE in my template, but cannot have the time zone offset appended due to
outside factors. This is <SPAN class=555193915-10092008><FONT face=Arial
size=2>syslog-ng v2.0.9 on vanilla CentOS
v5.2.</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=555193915-10092008></SPAN><SPAN class=555193915-10092008><FONT
face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial size=2>I initially thought
of just making the date up from needed variables, but that raises a question
about the template string. </FONT></SPAN><SPAN
class=555193915-10092008><FONT face=Arial size=2>I needed this isodate
output: </FONT></SPAN><SPAN class=555193915-10092008><FONT face=Arial
size=2>YYYY-MM-DDThh:mm:ss</FONT></SPAN></DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial size=2>So, I was trying to
use this template:<BR>template t_myformat { </FONT></SPAN><SPAN
class=555193915-10092008><FONT face=Arial size=2>template("$YEAR-$MONTH-$DAY
$HOUR:$MIN:$SEC $HOST $MSG\n"); </FONT></SPAN><SPAN
class=555193915-10092008><FONT face=Arial size=2> template_escape(no);
</FONT></SPAN><SPAN class=555193915-10092008><FONT face=Arial
size=2>};</FONT></SPAN></DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial size=2>My issue is with the
need to have the capital 't' (T) in between the $DAY and $HOUR without any
spaces that ISO specifies. If I put the "T" directly after the $DAY, it
will of course fail to find the variable $DAYT. I tried many
variations of escaping the characters and only one worked, "\a"
(bell). I ended up with this string that produces the correct
output:</FONT></SPAN></DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial
size=2>template("$YEAR-$MONTH-$DAY\aT$HOUR:$MIN:$SEC $HOST
$MSG\n");</FONT></SPAN></DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial size=2>Is this supposed to
work? Is there a better or more correct method of defining the end of the
$DAY variable and getting that "T" directly after the day and before the
hour?</FONT></SPAN></DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=555193915-10092008><SPAN class=555193915-10092008><FONT
face=Arial size=2>Also, Is the TZOFFSET required on the ISODATE? And, Is
there an easier method to change the ISODATE string, either in conf
file or source code? I searched but did not see an
applicable place in the code to change the ISODATE string
parameters.</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=555193915-10092008><SPAN class=555193915-10092008><FONT
face=Arial size=2></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial size=2>I search the list
archives and after countless other google searches, I haven't seen this issue
come up before.</FONT></SPAN></DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=555193915-10092008><FONT face=Arial
size=2>Thanks</FONT></SPAN></DIV></BODY></HTML>