I’ve found that if you set the format to “jsonf” - just for the msg field - and
then the controlcharacters setting will catch a lot more control characters
like [. If you use “jsonf” (not “json”) it won’t add any additional JSON
formatting like “”’s and {}’s so your msg field should come out the other side
of the template just like string, with control characters properly escaped /
dropped
Andrew Griffin
Apple
ETS / Integration Services
1 Infinite Loop, 175-DR
Cupertino, CA 95014, USA
Office 408-783-8348
iPhone 916-897-4335
[email protected]
This email and any attachments may be privileged and may contain confidential
information intended only for the recipient(s) named above. Any other
distribution, forwarding, copying or disclosure of this message is strictly
prohibited. If you have received this email in error, please notify me
immediately by telephone or return email, and delete this message from your
system.
> On Feb 12, 2017, at 10:05 AM, nbw-rsyslog via rsyslog
> <[email protected]> wrote:
>
> I have *rootsh* logging to syslog/rsyslog and I am seeing xterm/terminal
> color codes in the logs. My rsyslog configuration has:
>
> $EscapeControlCharactersOnReceive off
>
> I have a template which applies *controlcharacters="drop"* to the /msg/
> property.
>
> This takes care of many control characters but not all of them. For example
> /[01;32m/ gets through.
>
> Is there a way to filter out these sequences as well? I am using
> rsyslog-7.4.7-16 on CentOS-7.
>
> TIA!
>
>
>
> --
> View this message in context:
> http://rsyslog-users.1305293.n2.nabble.com/Terminal-control-characters-tp7592199.html
> Sent from the rsyslog-users mailing list archive at Nabble.com.
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
> sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T
> LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.