mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 09:10:42 +01:00
omjournal: add more syslog fields in journal call
This commit is contained in:
parent
34a77cde24
commit
b8069e0dd6
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user