summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-06-29 15:45:39 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-06-29 15:45:39 +0200
commitc522f1932aa2233c9fe847e449b5556723f8c186 (patch)
tree6c110943e210cf4c49103fbbee12ba6b0051f3ae /runtime
parent10430a189af0ecdbdad6c2542280f6d397ec4752 (diff)
parentb0a3e85e102c3e549574bf8f418ca643109f2884 (diff)
downloadrsyslog-c522f1932aa2233c9fe847e449b5556723f8c186.tar.gz
rsyslog-c522f1932aa2233c9fe847e449b5556723f8c186.tar.xz
rsyslog-c522f1932aa2233c9fe847e449b5556723f8c186.zip
Merge branch 'master-elasticsearch' into tmp
Diffstat (limited to 'runtime')
-rw-r--r--runtime/msg.c2
-rw-r--r--runtime/rsconf.c2
-rw-r--r--runtime/rsyslog.h1
3 files changed, 3 insertions, 2 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index ec3dbfa1..a7df6928 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -2404,7 +2404,7 @@ jsonAddVal(uchar *pSrc, unsigned buflen, es_str_t **dst)
/* we hope we have only few escapes... */
*dst = es_newStr(buflen+10);
} else {
- *dst = es_newStrFromBuf((char*)pSrc, i-1);
+ *dst = es_newStrFromBuf((char*)pSrc, i);
}
if(*dst == NULL) {
ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index a8c1b4b9..16929b71 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -93,7 +93,7 @@ static uchar template_StdUsrMsgFmt[] = "\" %syslogtag%%msg%\n\r\"";
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_StdJSONFmt[] = "\"{\\\"message\\\":\\\"%msg%\\\",\\\"fromhost\\\":\\\"%HOSTNAME%\\\",\\\"facility\\\":\\\"%syslogfacility-text%\\\",\\\"priority\\\":\\\"%syslogpriority-text%\\\",\\\"timereported\\\":\\\"%timereported:::date-rfc3339%\\\",\\\"timegenerated\\\":\\\"%timegenerated:::date-rfc3339%\\\"}\",JSON";
+static uchar template_StdJSONFmt[] = "\"{\\\"message\\\":\\\"%msg:::json%\\\",\\\"fromhost\\\":\\\"%HOSTNAME:::json%\\\",\\\"facility\\\":\\\"%syslogfacility-text%\\\",\\\"priority\\\":\\\"%syslogpriority-text%\\\",\\\"timereported\\\":\\\"%timereported:::date-rfc3339%\\\",\\\"timegenerated\\\":\\\"%timegenerated:::date-rfc3339%\\\"}\"";
/* end templates */
void cnfDoCfsysline(char *ln);
diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h
index 058322bd..1da56085 100644
--- a/runtime/rsyslog.h
+++ b/runtime/rsyslog.h
@@ -374,6 +374,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth
RS_RET_CNF_INVLD_FRAMING = -2214, /**< invalid framing specified in config file */
RS_RET_LEGA_ACT_NOT_SUPPORTED = -2215, /**< the module (no longer) supports legacy action syntax */
RS_RET_MAX_OMSR_REACHED = -2216, /**< max nbr of string requests reached, not supported by core */
+ RS_RET_UID_MISSING = -2217, /**< a user id is missing (but e.g. a password provided) */
/* RainerScript error messages (range 1000.. 1999) */
RS_RET_SYSVAR_NOT_FOUND = 1001, /**< system variable could not be found (maybe misspelled) */