On 2/23/2018 3:19 AM, putcha narayana via rsyslog wrote:
Hello Experts,

Any help on my query about regular expression in rsyslog. The code below is not 
stripping off the <filename>.cpp from syslog.

if ( $syslogseverity-text != 'debug')
         if re_match($msg, "[a-zA-Z0-9]+\\.cpp:[0-9]+")
             set $!ext = re_extract($msg,"([a-zA-Z0-9]+\\.cpp:[0-9]+)",0,1,"");
             set $!msg= replace($msg, $!ext, "xxxx");
             set $!msg = $msg;

In Anticipation,
Warm Regards

You may have already provided this (sorry if I overlooked it), but could you provide a sample message that you'd like to modify?

If I get some time today I'll feed your test message into your example config block provided to test the results and then offer feedback.

I'm new to this process as well, but will see if I am able to assist even so.
rsyslog mailing list
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 

Reply via email to