[syslog-ng]Year in the log

Amodiovalerio Verde syslog-ng@lists.balabit.hu
Thu, 18 Sep 2003 16:28:38 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_001D_01C37E01.EA7689D0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Year in the logFrom syslog-ng 1.53 you could use the template =
option...(but there is no month in Short English Form...) like this

destination example { file("/var/log/example.log" template("$MONTH $DAY =
$YEAR $HOUR:$MIN:$SEC $MESSAGE")); };

(Read this post : =
https://lists.balabit.hu/pipermail/syslog-ng/2001-January/001153.html to =
understand template option)



Amodiovalerio [Hypo] Verde
  ----- Original Message -----=20
  From: Zhou, Tao (Tao)=20
  To: syslog-ng@lists.balabit.hu=20
  Sent: Thursday, September 18, 2003 4:58 AM
  Subject: [syslog-ng]Year in the log


  Is there a way for syslog-ng to include year in a logged message? For =
example,=20

  Sep 17 2003 20:00:00 ...=20

  Thanks.=20

  Tao Zhou=20

------=_NextPart_000_001D_01C37E01.EA7689D0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Year in the log</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>From syslog-ng 1.53 you could use the =
template=20
option...(but there is no month in Short English Form...) like =
this</FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><FONT face=3DArial=20
size=3D2></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>destination&nbsp;example {=20
file("/var/log/example.log" template("$MONTH $DAY $YEAR $HOUR:$MIN:$SEC=20
$MESSAGE")); };</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>(Read this post : <A=20
href=3D"https://lists.balabit.hu/pipermail/syslog-ng/2001-January/001153.=
html">https://lists.balabit.hu/pipermail/syslog-ng/2001-January/001153.ht=
ml</A>&nbsp;to=20
understand template option)</DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Amodiovalerio [Hypo] Verde</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Dtzhou1@avaya.com href=3D"mailto:tzhou1@avaya.com">Zhou, Tao =
(Tao)</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Dsyslog-ng@lists.balabit.hu=20
  =
href=3D"mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</A>=
 </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, September 18, =
2003 4:58=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [syslog-ng]Year in the =
log</DIV>
  <DIV><FONT face=3DArial size=3D2></FONT><BR></DIV><!-- Converted from =
text/rtf format -->
  <P><FONT face=3DArial size=3D2>Is there a way for syslog-ng to include =
year in a=20
  logged message? For example,</FONT> </P>
  <P><FONT face=3DArial size=3D2>Sep 17 </FONT><FONT face=3DArial =
color=3D#ff0000=20
  size=3D2>2003</FONT><FONT face=3DArial size=3D2> 20:00:00 ...</FONT> =
</P>
  <P><FONT face=3DArial size=3D2>Thanks.</FONT> </P>
  <P><FONT face=3DArial size=3D2>Tao Zhou</FONT> =
</P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_001D_01C37E01.EA7689D0--