summaryrefslogtreecommitdiffstats
path: root/template.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-04-02 12:48:07 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-04-02 12:48:07 +0200
commit3954f2e166c3cbd78c71819c8d6c25120042dbcf (patch)
tree2c70fa3bb36f763490146e1fa6e205600f5afb34 /template.c
parente4f012eb60f6531f964557ba9eac54048ae2bef8 (diff)
downloadrsyslog-3954f2e166c3cbd78c71819c8d6c25120042dbcf.tar.gz
rsyslog-3954f2e166c3cbd78c71819c8d6c25120042dbcf.tar.xz
rsyslog-3954f2e166c3cbd78c71819c8d6c25120042dbcf.zip
added new "csv" property replacer option
to enable simple creation of CSV-formatted outputs (format from RFC4180 is used)
Diffstat (limited to 'template.c')
-rw-r--r--template.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/template.c b/template.c
index 6fb7ba2b..4f507ff6 100644
--- a/template.c
+++ b/template.c
@@ -460,6 +460,8 @@ static void doOptions(unsigned char **pp, struct templateEntry *pTpe)
pTpe->data.field.options.bSecPathDrop = 1;
} else if(!strcmp((char*)Buf, "secpath-replace")) {
pTpe->data.field.options.bSecPathReplace = 1;
+ } else if(!strcmp((char*)Buf, "csv")) {
+ pTpe->data.field.options.bCSV = 1;
} else {
dbgprintf("Invalid field option '%s' specified - ignored.\n", Buf);
}
@@ -1105,6 +1107,9 @@ void tplPrintList(void)
if(pTpe->data.field.options.bSPIffNo1stSP) {
dbgprintf("[SP iff no first SP] ");
}
+ if(pTpe->data.field.options.bCSV) {
+ dbgprintf("[format as CSV (RFC4180)]");
+ }
if(pTpe->data.field.options.bDropLastLF) {
dbgprintf("[drop last LF in msg] ");
}