[rsyslog] filter logger tags from syslog

david at lang.hm david at lang.hm
Sat Nov 28 10:43:03 CET 2009


On Fri, 27 Nov 2009, Jose Sanchez wrote:

> Hello David and Reiner,
>
> First I would like to thank you for all the help offered, I was able to setup almost everything because of you guys.
>
> I had some issues today, though. I found that rsyslog was removing the "logger" properly but it was adding an extra empty space not sure why so I had to cut if off (by watching how to do it on video tutorial first!) by modifying the template that David gave me, I currently have it like this,
>
> $template line,"%msg:2:1000%\n"
>
> The thing here is Im not sure if this is a reliable solution, I couldnt find if there is any setting that will tell rsyslog to simply remove the empty space or to get everything until the last letter so I configured a very long (1000) number in case rsyslog cuts some part of the text. Not sure if there is any negative impact on doing it this way, if there is any other better way, please let me know.

if you use '$' instead of '1000' it will go to the end of the message, no 
matter how long it is (1000 is not long enough for some messages)

I think that what you are doing is probably the best way to deal with 
this space.

David Lang



More information about the rsyslog mailing list