diff -up rsyslog-5.8.7/doc/rsyslog_conf_templates.html.orig rsyslog-5.8.7/doc/rsyslog_conf_templates.html --- rsyslog-5.8.7/doc/rsyslog_conf_templates.html.orig 2012-01-20 14:04:54.976086070 +0100 +++ rsyslog-5.8.7/doc/rsyslog_conf_templates.html 2012-01-20 14:06:35.890817529 +0100 @@ -146,6 +146,10 @@ with high-precision timestamps and timez useful if you send messages to other syslogd's or rsyslogd below version 3.12.5. +
  • RSYSLOG_SysklogdFileFormat +- sysklogd compatible log file format. If used with options: $SpaceLFOnReceive on; +$EscapeControlCharactersOnReceive off; $DropTrailingLFOnReception off, +the log format will conform to sysklogd log format.
  • RSYSLOG_ForwardFormat - a new high-precision forwarding format very similar to the traditional one, but with high-precision timestamps and timezone diff -up rsyslog-5.8.7/tools/syslogd.c.orig rsyslog-5.8.7/tools/syslogd.c --- rsyslog-5.8.7/tools/syslogd.c.orig 2012-01-20 14:05:04.985960243 +0100 +++ rsyslog-5.8.7/tools/syslogd.c 2012-01-20 14:11:20.527239529 +0100 @@ -335,6 +335,7 @@ static uchar template_StdUsrMsgFmt[] = " static uchar template_StdDBFmt[] = "\"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-mysql%', '%timegenerated:::date-mysql%', %iut%, '%syslogtag%')\",SQL"; static uchar template_StdPgSQLFmt[] = "\"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-pgsql%', '%timegenerated:::date-pgsql%', %iut%, '%syslogtag%')\",STDSQL"; static uchar template_spoofadr[] = "\"%fromhost-ip%\""; +static uchar template_SysklogdFileFormat[] = "\"%TIMESTAMP% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg%\n\""; /* end templates */ @@ -2171,6 +2172,8 @@ static rsRetVal mainThread() tplAddLine(" StdUsrMsgFmt", &pTmp); pTmp = template_StdDBFmt; tplAddLine(" StdDBFmt", &pTmp); + pTmp = template_SysklogdFileFormat; + tplAddLine("RSYSLOG_SysklogdFileFormat", &pTmp); pTmp = template_StdPgSQLFmt; tplAddLine(" StdPgSQLFmt", &pTmp); pTmp = template_spoofadr;