summaryrefslogtreecommitdiffstats
path: root/template.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-07-18 12:50:14 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-07-18 12:50:14 +0200
commit73abfd1fad59ffc426072bac779e4c0f4c712619 (patch)
treedbc3017f672bc31131b3f75abe5d2c214755b24c /template.c
parent2879b72bdca5ec0bc5d26405662305d1a562a382 (diff)
downloadrsyslog-73abfd1fad59ffc426072bac779e4c0f4c712619.tar.gz
rsyslog-73abfd1fad59ffc426072bac779e4c0f4c712619.tar.xz
rsyslog-73abfd1fad59ffc426072bac779e4c0f4c712619.zip
added new poperty replacer option, added missing documentation
- added a new property replacer option "sp-if-no-1st-sp" to cover a problem with RFC 3164 based interpreation of tag separation. While it is a generic approach, it fixes a format problem introduced in 3.18.0, where kernel messages no longer had a space after the tag. This is done by a modifcation of the default templates. Please note that this may affect some messages where there intentionally is no space between the tag and the first character of the message content. If so, this needs to be worked around via a specific template. However, we consider this scenario to be quite remote and, even if it exists, it is not expected that it will actually cause problems with log parsers (instead, we assume the new default template behaviour may fix previous problems with log parsers due to the missing space). - doc bugfix: property replacer options secpath-replace and secpath-drop were not documented
Diffstat (limited to 'template.c')
-rw-r--r--template.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/template.c b/template.c
index 844c5aec..627f8911 100644
--- a/template.c
+++ b/template.c
@@ -444,6 +444,8 @@ static void doOptions(unsigned char **pp, struct templateEntry *pTpe)
pTpe->data.field.eCaseConv = tplCaseConvLower;
} else if(!strcmp((char*)Buf, "uppercase")) {
pTpe->data.field.eCaseConv = tplCaseConvUpper;
+ } else if(!strcmp((char*)Buf, "sp-if-no-1st-sp")) {
+ pTpe->data.field.options.bSPIffNo1stSP = 1;
} else if(!strcmp((char*)Buf, "escape-cc")) {
pTpe->data.field.options.bEscapeCC = 1;
} else if(!strcmp((char*)Buf, "drop-cc")) {
@@ -1013,6 +1015,15 @@ void tplPrintList(void)
if(pTpe->data.field.options.bSpaceCC) {
dbgprintf("[replace control-characters with space] ");
}
+ if(pTpe->data.field.options.bSecPathDrop) {
+ dbgprintf("[slashes are dropped] ");
+ }
+ if(pTpe->data.field.options.bSecPathReplace) {
+ dbgprintf("[slashes are replaced by '_'] ");
+ }
+ if(pTpe->data.field.options.bSPIffNo1stSP) {
+ dbgprintf("[SP iff no first SP] ");
+ }
if(pTpe->data.field.options.bDropLastLF) {
dbgprintf("[drop last LF in msg] ");
}