Sure, done, see 02_better_printing_stacktrace.diff  attached.<br><br><br><div class="gmail_quote">2012/12/4 Ovidiu Sas <span dir="ltr">&lt;<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Konstantin,<br>
<br>
I applied the first patch.  Thank you.<br>
For the second patch, I would like to use the internal kamailio memory<br>
manager: pkg_malloc and pkg_realloc instead of calloc and realloc.<br>
Could you please rework the second patch and test?<br>
<br>
Thanks,<br>
Ovidiu<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Dec 3, 2012 at 6:14 PM, Konstantin M. &lt;<a href="mailto:evilzluk@gmail.com">evilzluk@gmail.com</a>&gt; wrote:<br>
&gt; Hello Ovidiu Sas,<br>
&gt; Sure, I just removed this, see 01_expand_log_facilities.diff attached.<br>
&gt; Also I changed a printing of stack trace (see<br>
&gt; 02_better_printing_stacktrace.diff) according to standard python&#39;s<br>
&gt; traceback.<br>
&gt;<br>
&gt; Example of old printing:<br>
&gt;  0(4842) ERROR: app_python [python_support.c:38]: python_exec2: Unhandled<br>
&gt; exception in the Python code:<br>
&gt;  0(4842) ERROR: app_python [python_support.c:78]:       Traceback (most<br>
&gt; recent call last):<br>
&gt;  0(4842) ERROR: app_python [python_support.c:78]:         File<br>
&gt; &quot;/opt/kamailio/python/Kam-Loggers.py&quot;, line 34, in BuggyCode<br>
&gt;     return self.BuggyCode_lvl2(a)<br>
&gt;  0(4842) ERROR: app_python [python_support.c:78]:         File<br>
&gt; &quot;/opt/kamailio/python/Kam-Loggers.py&quot;, line 31, in BuggyCode_lvl2<br>
&gt;     return self.BuggyCode_lvl3(a)<br>
&gt;  0(4842) ERROR: app_python [python_support.c:78]:         File<br>
&gt; &quot;/opt/kamailio/python/Kam-Loggers.py&quot;, line 28, in BuggyCode_lvl3<br>
&gt;     return self.BuggyCode_lvl4(a)<br>
&gt;  0(4842) ERROR: app_python [python_support.c:78]:         File<br>
&gt; &quot;/opt/kamailio/python/Kam-Loggers.py&quot;, line 25, in BuggyCode_lvl4<br>
&gt;     return self.BuggyCode_lvl5(a)<br>
&gt;  0(4842) ERROR: app_python [python_support.c:78]:         File<br>
&gt; &quot;/opt/kamailio/python/Kam-Loggers.py&quot;, line 22, in BuggyCode_lvl5<br>
&gt;     a / 0<br>
&gt;  0(4842) ERROR: app_python [python_support.c:78]:       TypeError:<br>
&gt; unsupported operand type(s) for /: &#39;Router.msg&#39; and &#39;int&#39;<br>
&gt;<br>
&gt;<br>
&gt; Example of new printing:<br>
&gt;  0(4753) ERROR: app_python [python_support.c:95]: python_exec2: Unhandled<br>
&gt; exception in the Python code:<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;/opt/kamailio/python/Kam-Loggers.py&quot;, line 34, in BuggyCode<br>
&gt;     return self.BuggyCode_lvl2(a)<br>
&gt;   File &quot;/opt/kamailio/python/Kam-Loggers.py&quot;, line 31, in BuggyCode_lvl2<br>
&gt;     return self.BuggyCode_lvl3(a)<br>
&gt;   File &quot;/opt/kamailio/python/Kam-Loggers.py&quot;, line 28, in BuggyCode_lvl3<br>
&gt;     return self.BuggyCode_lvl4(a)<br>
&gt;   File &quot;/opt/kamailio/python/Kam-Loggers.py&quot;, line 25, in BuggyCode_lvl4<br>
&gt;     return self.BuggyCode_lvl5(a)<br>
&gt;   File &quot;/opt/kamailio/python/Kam-Loggers.py&quot;, line 22, in BuggyCode_lvl5<br>
&gt;     a / 0<br>
&gt; TypeError: unsupported operand type(s) for /: &#39;Router.msg&#39; and &#39;int&#39;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2012/12/4 Ovidiu Sas &lt;<a href="mailto:osas@voipembedded.com">osas@voipembedded.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hello Konstantin,<br>
&gt;&gt;<br>
&gt;&gt; I would be happy to commit your patch, but I would like to ask you to<br>
&gt;&gt; remove, for now, the conditional FLAVOUR compilation.<br>
&gt;&gt; You could leave the module name as &quot;Router&quot; for now.<br>
&gt;&gt; Can you generate an new patch file without FLAVOUR?<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Ovidiu Sas<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Dec 3, 2012 at 2:50 PM, Konstantin M. &lt;<a href="mailto:evilzluk@gmail.com">evilzluk@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hi Dev,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Modified app_python:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 1) Added FLAVOUR support<br>
&gt;&gt; &gt; 2) Added python objects:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;   Module Properties:<br>
&gt;&gt; &gt;      Log Levels:<br>
&gt;&gt; &gt;          L_ALERT<br>
&gt;&gt; &gt;          L_BUG<br>
&gt;&gt; &gt;          L_CRIT2<br>
&gt;&gt; &gt;          L_CRIT<br>
&gt;&gt; &gt;          L_ERR<br>
&gt;&gt; &gt;          L_WARN<br>
&gt;&gt; &gt;          L_NOTICE<br>
&gt;&gt; &gt;          L_INFO<br>
&gt;&gt; &gt;          L_DBG<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;      Log Facilities:<br>
&gt;&gt; &gt;          DEFAULT_FACILITY<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;   Module Methods:<br>
&gt;&gt; &gt;      LM_GEN1(self, int log_level, str msg)<br>
&gt;&gt; &gt;      LM_GEN2(self, int log_facility, int log_level, str msg)<br>
&gt;&gt; &gt;      LM_ALERT(self, str msg)<br>
&gt;&gt; &gt;      LM_CRIT(self, str msg)<br>
&gt;&gt; &gt;      LM_ERR(self, str msg)<br>
&gt;&gt; &gt;      LM_WARN(self, str msg)<br>
&gt;&gt; &gt;      LM_NOTICE(self, str msg)<br>
&gt;&gt; &gt;      LM_INFO(self, str msg)<br>
&gt;&gt; &gt;      LM_DBG(self, str msg)<br>
&gt;&gt; &gt;<br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</div></div></blockquote></div><br>