summaryrefslogtreecommitdiffstats
path: root/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-28 11:18:42 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-28 11:18:42 +0000
commitbc7d4087b2299bf7ee627e314c46ccaa0169b673 (patch)
treeb0d08a401760b94902cc4c5e191f06f5a374ad6e /syslogd.c
parent52a4bdfa414d06cc1610224df8aa179d61ea9963 (diff)
downloadrsyslog-bc7d4087b2299bf7ee627e314c46ccaa0169b673.zip
rsyslog-bc7d4087b2299bf7ee627e314c46ccaa0169b673.tar.gz
rsyslog-bc7d4087b2299bf7ee627e314c46ccaa0169b673.tar.xz
added build-in templates
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/syslogd.c b/syslogd.c
index 6178a4e..20f9882 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -417,6 +417,7 @@ int option_DisallowWarning = 1; /* complain if message from disallowed sender is
/* hardcoded standard templates (used for defaults) */
+static uchar template_SyslogProtocol23Format[] = "\"<%PRI%>1 %TIMESTAMP:::date-rfc3339% %HOSTNAME% %APP-NAME% %PROCID% %MSGID% %STRUCTURED-DATA% %msg%\n\"";
static uchar template_TraditionalFileFormat[] = "\"%TIMESTAMP% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n\"";
static uchar template_FileFormat[] = "\"%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n\"";
static uchar template_WallFmt[] = "\"\r\n\7Message from syslogd@%HOSTNAME% at %timegenerated% ...\r\n %syslogtag%%msg%\n\r\"";
@@ -2812,10 +2813,9 @@ static void mainThread()
* is that we need to interrupt the select() system call. -- rgerhards, 2007-10-17
*/
- /* initialize the default templates
- * we use template names with a SP in front - these
- * can NOT be generated via the configuration file
- */
+ /* initialize the build-in templates */
+ pTmp = template_SyslogProtocol23Format;
+ tplAddLine("RSYSLOG_SyslogProtocol23Format", &pTmp);
pTmp = template_FileFormat; /* new format for files with high-precision stamp */
tplAddLine("RSYSLOG_FileFormat", &pTmp);
pTmp = template_TraditionalFileFormat;