omjournal: add more syslog fields in journal call

This commit is contained in:
Rainer Gerhards 2013-02-27 19:04:44 +01:00
parent 34a77cde24
commit b8069e0dd6

View File

@ -128,16 +128,21 @@ ENDtryResume
BEGINdoAction
msg_t *pMsg;
uchar *tag;
int lenTag;
int sev;
int r;
CODESTARTdoAction
pMsg = (msg_t*) ppString[0];
MsgGetSeverity(pMsg, &sev);
getTAG(pMsg, &tag, &lenTag);
/* we can use more properties here, but let's see if there
* is some real user interest. We can always add later...
*/
r = sd_journal_send("MESSAGE=%s", getMSG(pMsg),
"PRIORITY=%d", sev,
"SYSLOG_FACILITY=%d", pMsg->iFacility,
"SYSLOG_IDENTIFIER=%s", tag,
NULL);
/* FIXME: think about what to do with errors ;) */
ENDdoAction