<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Oops, forgot the version… I'm running 3.3.3.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">For now, I'm locked into using version 3.3.3.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">In my implementation, I'm defining
<i>destinations</i> once (local log file, remote syslog server, Email address, â€¦) and use them for multiple
<i>services</i>. Each <i>service</i> can have a different message format for each
<i>destination</i>, and I want to avoid defining a new <i>destination</i> for each
<i>service/destination</i> combination.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Upon further investigation, I think I can use the
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">'if'</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"> template function to pick which of my custom functions to use and avoid the rewrites.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">The template functions that I can release are:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Using
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">'ipv4-to-int'</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"> as a template and added these to
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">'modules/convertfuncs/convert-funcs.c'</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">/*<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">* HP - add a 'to-lower-case' function<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">* change case to lower for a string<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">*/<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">static void<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">tf_to_lower_case(LogMessage *msg, gint argc, GString *argv[], GString *result)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; gint i;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; argc; i&#43;&#43;)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char *p;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p = argv[i]-&gt;str;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (*p)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_string_append_c(result, tolower(*p&#43;&#43;));<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (i &lt; argc -1)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_string_append_c(result, ' ');<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">/*<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">* HP - add a 'to-upper-case' function<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">* change case to upper for a string<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">*/<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">static void<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">tf_to_upper_case(LogMessage *msg, gint argc, GString *argv[], GString *result)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; gint i;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; argc; i&#43;&#43;)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char *p;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p = argv[i]-&gt;str;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (*p)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_string_append_c(result, toupper(*p&#43;&#43;));<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (i &lt; argc -1)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_string_append_c(result, ' ');<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">/*<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">* HP - add a 'tab-to-comma' function<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">* change tabs to commas ',' in a string<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">*/<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">static void<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">tf_tab_to_comma(LogMessage *msg, gint argc, GString *argv[], GString *result)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; gint i;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; argc; i&#43;&#43;)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char *p;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p = argv[i]-&gt;str;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (*p)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_string_append_c(result, (*p&#43;&#43; == '\t')?',':*(p-1));<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (i &lt; argc -1)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_string_append_c(result, ' ');<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">/*<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">* HP - add a 'tab_to_semicolon' function<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">* change tabs to semicolons ';' in a string<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">*/<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">static void<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">tf_tab_to_semicolon(LogMessage *msg, gint argc, GString *argv[], GString *result)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; gint i;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; argc; i&#43;&#43;)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char *p;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p = argv[i]-&gt;str;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (*p)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_string_append_c(result, (*p&#43;&#43; == '\t')?';':*(p-1));<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (i &lt; argc -1)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_string_append_c(result, ' ');<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">/*<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">* HP - add a 'tab-to-Bar' function<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">* change tabs to bars '|' in a string<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">*/<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">static void<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">tf_tab_to_bar(LogMessage *msg, gint argc, GString *argv[], GString *result)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;gint i;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; argc; i&#43;&#43;)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char *p;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p = argv[i]-&gt;str;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (*p)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_string_append_c(result, (*p&#43;&#43; == '\t')?'|':*(p-1));<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (i &lt; argc -1)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g_string_append_c(result, ' ');<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">TEMPLATE_FUNCTION_SIMPLE(tf_ipv4_to_int);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">TEMPLATE_FUNCTION_SIMPLE(tf_to_lower_case);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">TEMPLATE_FUNCTION_SIMPLE(tf_to_upper_case);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">TEMPLATE_FUNCTION_SIMPLE(tf_tab_to_comma);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">TEMPLATE_FUNCTION_SIMPLE(tf_tab_to_semicolon);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">TEMPLATE_FUNCTION_SIMPLE(tf_tab_to_bar);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">static Plugin convert_func_plugins[] =<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp; TEMPLATE_FUNCTION_PLUGIN(tf_ipv4_to_int, &quot;ipv4-to-int&quot;),<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp; TEMPLATE_FUNCTION_PLUGIN(tf_to_lower_case, &quot;to-lower-case&quot;),<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp; TEMPLATE_FUNCTION_PLUGIN(tf_to_upper_case, &quot;to-upper-case&quot;),<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp; TEMPLATE_FUNCTION_PLUGIN(tf_tab_to_comma, &quot;tab-to-comma&quot;),<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp; TEMPLATE_FUNCTION_PLUGIN(tf_tab_to_semicolon, &quot;tab-to-semicolon&quot;),<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">&nbsp; TEMPLATE_FUNCTION_PLUGIN(tf_tab_to_bar, &quot;tab-to-bar&quot;),<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:1.0in"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;color:#1F497D">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Chris<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Balazs Scheidler [mailto:bazsi77@gmail.com]
<br>
<b>Sent:</b> Friday, January 25, 2013 10:48 PM<br>
<b>To:</b> Syslog-ng users' and developers' mailing list; Johnson, Chris (HP TippingPoint Roseville)<br>
<b>Subject:</b> Re: [syslog-ng] Problems with rewrite set and template functions...<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p style="margin-bottom:12.0pt">Hi, <br>
<br>
I recall something related, but I need to check. In that case the clone method wasn't properly initializing all the fields of an object in case it is referenced multiple times.
<br>
<br>
Which version are you using? <br>
<br>
I see you have implemented a number of interesting template functions, I'd like to integrate them to syslog-ng if you are permitted to contribute them.
<br>
<br>
Also, you might be able to get rid of rewrite rules and simply use the template option for file destinations, that'd get your config much simpler.
<br>
<br>
And another note, 3.4 offers junctions and channels that again can make it possible to enclose your rewrites into reusable blocks, and by the use of inline objects, would also simplify the configuration a lot.
<br>
<br>
Cheers, <br>
<br>
----- Original message ----- <br>
&gt; Hi all, <br>
&gt; I've come across a problem when using the rewrite set function with a <br>
&gt; template function. I've created a custom template function <br>
&gt; 'audit-TPTI-to-Email' and use it in a rewrite: rewrite r_audit_EMail { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set(&quot;$(audit-TPTI-to-EMail ${MSG})&quot;, value(&quot;MSG&quot;)); <br>
&gt; }; <br>
&gt; <br>
&gt; Then call it: <br>
&gt; filter f_audit_pgm{program(&quot;AUDIT-*&quot; type(&quot;glob&quot;));}; <br>
&gt; log { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; source(s_local); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filter(f_audit_pgm); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination(d_logID_02); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }; <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite(r_audit_EMail); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite(r_quote_newlines); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination(d_logID_13); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }; <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flags(final); <br>
&gt; }; <br>
&gt; Everything work fine. <br>
&gt; Then if I add another call to rewrite (i.e. add a second email <br>
&gt; destination): filter f_audit_pgm{program(&quot;AUDIT-*&quot; type(&quot;glob&quot;));}; <br>
&gt; log { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; source(s_local); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filter(f_audit_pgm); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination(d_logID_02); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }; <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite(r_audit_EMail); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite(r_quote_newlines); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination(d_logID_13); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }; <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite(r_audit_EMail); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite(r_quote_newlines); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination(d_logID_14); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }; <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; flags(final); <br>
&gt; }; <br>
&gt; Syslog-ng crashes with a segfault. <br>
&gt; I've narrowed in down to any template function (just to make sure *I* <br>
&gt; wasn't screwing something up in my custom function): rewrite r_echo { <br>
&gt; set(&quot;$(echo $PROGRAM)&quot; value(&quot;PROGRAM&quot;)); }; destination d_test1{ <br>
&gt; file(&quot;/var/log/test1.log&quot;); }; destination d_test2{ <br>
&gt; file(&quot;/var/log/test2.log&quot;); }; <br>
&gt; <br>
&gt; log { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; source(s_local); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite(r_echo); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination(d_test1); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }; <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; log { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite(r_echo); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination(d_test2); <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }; <br>
&gt; }; <br>
&gt; <br>
&gt; The backtrace: <br>
&gt; Backtrace: <br>
&gt; /usr/local/lib/libsyslog-ng-3.3.3.so(plugin_find&#43;0x39)[0x7f3eb76ff019] <br>
&gt; /usr/local/lib/libsyslog-ng-3.3.3.so(log_template_compile&#43;0x84f)[0x7f3eb7703baf]
<br>
&gt; /usr/local/lib/libsyslog-ng-3.3.3.so(log_rewrite_set_new&#43;0x99)[0x7f3eb76f3349] <br>
&gt; /usr/local/lib/libsyslog-ng-3.3.3.so[0x7f3eb76f3371] <br>
&gt; /usr/local/lib/libsyslog-ng-3.3.3.so(log_center_init_pipe_line&#43;0x35d)[0x7f3eb76dfecd]
<br>
&gt; /usr/local/lib/libsyslog-ng-3.3.3.so(log_center_init_pipe_line&#43;0xd2)[0x7f3eb76dfc42]
<br>
&gt; /usr/local/lib/libsyslog-ng-3.3.3.so(log_center_init&#43;0x56)[0x7f3eb76e0226] <br>
&gt; /usr/local/lib/libsyslog-ng-3.3.3.so(cfg_init&#43;0xb0)[0x7f3eb76e1530] <br>
&gt; /usr/local/lib/libsyslog-ng-3.3.3.so(main_loop_init&#43;0x11b)[0x7f3eb76f9abb] <br>
&gt; /usr/local/sbin/syslog-ng(main&#43;0x11f)[0x40168f] <br>
&gt; /lib/libc.so.6(__libc_start_main&#43;0xe6)[0x7f3eb6240126] <br>
&gt; /usr/local/sbin/syslog-ng[0x401379] <br>
&gt; <br>
&gt; I threw in some debug statements: <br>
&gt; LogRewrite * <br>
&gt; log_rewrite_set_new(const gchar *new_value) <br>
&gt; { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; fprintf(stderr, &quot;%s('%s'):\n&quot;, __FUNCTION__, new_value); <br>
&gt; <br>
&gt; Plugin * <br>
&gt; plugin_find(GlobalConfig *cfg, gint plugin_type, const gchar <br>
&gt; *plugin_name) { <br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; fprintf(stderr, &quot;%s(%p, %d, '%s'): '\n&quot;, __FUNCTION__, cfg, <br>
&gt; plugin_type, plugin_name); <br>
&gt; <br>
&gt; Which showed that the 'cfg' pointer is null when rewrite is called the <br>
&gt; second time: log_rewrite_set_new('$(echo $PROGRAM)'): <br>
&gt; plugin_find(0x60e210, 13, 'echo'): ' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'sys-to-EMail' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'audit-TPTI-to-EMail' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'quar-TPTI-to-EMail' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'quar-TPTI-to-CEF' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'tab-to-bar' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'tab-to-semicolon' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'tab-to-comma' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'to-upper-case' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'to-lower-case' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'ipv4-to-int' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'log-session-seqnum' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'indent-multi-line' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'if' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'grep' <br>
&gt; plugin_find:&nbsp; &nbsp; &nbsp; plugin-&gt;name = 'echo' <br>
&gt; plugin_find(0x60e210, 2, 'file'): ' <br>
&gt; [...] <br>
&gt; log_rewrite_set_new('$(echo $PROGRAM)'): <br>
&gt; plugin_find((nil), 13, 'echo'): ' <br>
&gt; *** Segmentation fault <br>
&gt; <br>
&gt; Sooo, my questions are: <br>
&gt; Is this expected behavior? <br>
&gt; Has this been patched already? <br>
&gt; Is there another way I can call a custom function to reformat the <br>
&gt; message field on a destination-by-destination basis? <br>
&gt; <br>
&gt; Thanks, <br>
&gt; Chris <br>
&gt; <br>
&gt; ---------------------------------------- <br>
&gt; Christopher Johnson <br>
&gt; <a href="mailto:chris.johnson3@hp.com">chris.johnson3@hp.com</a>&lt;<a href="mailto:chris.johnson3@hp.com">mailto:chris.johnson3@hp.com</a>&gt;
<br>
&gt; HP Software - Security Product Group <br>
&gt; (916) 785-2817 <br>
&gt; ---------------------------------------- <br>
&gt; <o:p></o:p></p>
</div>
</body>
</html>