diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-24 19:37:16 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-24 19:37:16 +0200 |
commit | 39b9aac66390eab4a7a9c0898744363a61cd4457 (patch) | |
tree | 74238e62fe05a688c66712f79303883cf6e8e6ec /grammar | |
parent | 8d99cfe38509aeadf169ba63c0d6c841eb2ecbe3 (diff) | |
download | rsyslog-39b9aac66390eab4a7a9c0898744363a61cd4457.tar.gz rsyslog-39b9aac66390eab4a7a9c0898744363a61cd4457.tar.xz rsyslog-39b9aac66390eab4a7a9c0898744363a61cd4457.zip |
cleanup & better debug output
- removed no longer needed function
- debug log now contains action type for action objects
Diffstat (limited to 'grammar')
-rw-r--r-- | grammar/rainerscript.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index ab07e0c4..d3e82fae 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -1628,7 +1628,7 @@ cnfstmtPrint(struct cnfstmt *root, int indent) doIndent(indent); dbgprintf("STOP\n"); break; case S_ACT: - doIndent(indent); dbgprintf("ACTION %p (%s)\n", stmt->d.act, stmt->printable); + doIndent(indent); dbgprintf("ACTION %p [%s]\n", stmt->d.act, stmt->printable); break; case S_IF: doIndent(indent); dbgprintf("IF\n"); @@ -1845,6 +1845,7 @@ struct cnfstmt * cnfstmtNewAct(struct nvlst *lst) { struct cnfstmt* cnfstmt; + char namebuf[256]; if((cnfstmt = cnfstmtNew(S_ACT)) == NULL) goto done; if(actionNewInst(lst, &cnfstmt->d.act) != RS_RET_OK) { @@ -1854,7 +1855,10 @@ cnfstmtNewAct(struct nvlst *lst) cnfstmt->nodetype = S_NOP; /* disable action! */ goto done; } - cnfstmt->printable = (uchar*)strdup("action()"); + snprintf(namebuf, sizeof(namebuf)-1, "action(type=\"%s\" ...)", + modGetName(cnfstmt->d.act->pMod)); + namebuf[255] = '\0'; /* be on safe side */ + cnfstmt->printable = (uchar*)strdup(namebuf); done: return cnfstmt; } |