diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-06-29 15:51:46 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-06-29 15:51:46 +0200 |
commit | ba5f628cbb43d6a4add15c6fab50e35b5c54c5b8 (patch) | |
tree | 74dbe259b64d8f6e839e5c99a7d99f2edaf32f2b /runtime | |
parent | 40334847b685e6058be562b4436f72426637f4d8 (diff) | |
parent | b397a80c88be0de6e7450bcbeb3524be98e572b6 (diff) | |
download | rsyslog-ba5f628cbb43d6a4add15c6fab50e35b5c54c5b8.tar.gz rsyslog-ba5f628cbb43d6a4add15c6fab50e35b5c54c5b8.tar.xz rsyslog-ba5f628cbb43d6a4add15c6fab50e35b5c54c5b8.zip |
Merge branch 'beta'
Conflicts:
ChangeLog
runtime/rsyslog.h
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/msg.c | 2 | ||||
-rw-r--r-- | runtime/rsconf.c | 2 | ||||
-rw-r--r-- | runtime/rsyslog.h | 1 |
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 9ee13dd4..bd002353 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -94,7 +94,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 778fcf68..d802536a 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) */ /* reserved for pre-v6.5 */ RS_RET_DUP_PARAM = -2220, /**< config parameter is given more than once */ RS_RET_MODULE_ALREADY_IN_CONF = -2221, /**< module already in current configuration */ |