Module: kamailio
Branch: master
Commit: 363027e7fc5020ba80f0b183fc87921f3d3b641b
URL: https://github.com/kamailio/kamailio/commit/363027e7fc5020ba80f0b183fc87921…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro>
Committer: Stefan Mititelu <stefan.mititelu(a)1and1.ro>
Date: 2015-06-10T15:43:36+03:00
debugger: add a new dbg_sip_msg() config function
Added a config function which prints how the sip message would look like
if it were to be sent out at that point in config. Displays how the message
looks after apllying all the lumps; but it is just printing, not actual
lump application. Updated doku.
---
Modified: dprint.h
Modified: modules/debugger/debugger_mod.c
Modified: modules/debugger/doc/debugger_admin.xml
Modified: msg_translator.c
Modified: msg_translator.h
---
Diff: https://github.com/kamailio/kamailio/commit/363027e7fc5020ba80f0b183fc87921…
Patch: https://github.com/kamailio/kamailio/commit/363027e7fc5020ba80f0b183fc87921…
Module: kamailio
Branch: master
Commit: 57e05de6dbb2de117be32b785944dabdbff4e49e
URL: https://github.com/kamailio/kamailio/commit/57e05de6dbb2de117be32b785944dab…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro>
Committer: Stefan Mititelu <stefan.mititelu(a)1and1.ro>
Date: 2015-06-10T15:41:43+03:00
debugger: updated documentation for the new facility parameters.
Updated documentation for the new debugger facility params.
---
Modified: modules/debugger/doc/debugger_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/57e05de6dbb2de117be32b785944dab…
Patch: https://github.com/kamailio/kamailio/commit/57e05de6dbb2de117be32b785944dab…
---
diff --git a/modules/debugger/doc/debugger_admin.xml b/modules/debugger/doc/debugger_admin.xml
index 031e9e0..c4b6eb2 100644
--- a/modules/debugger/doc/debugger_admin.xml
+++ b/modules/debugger/doc/debugger_admin.xml
@@ -19,8 +19,9 @@
<para>
This module provides an interactive config file debugger. It can print
a trace of config script execution for a SIP message to log and set
- breakpoints on every script action, allowing step-by-step execution of
- the routing and response scripts.
+ breakpoints on every script action, allowing step-by-step execution of
+ the routing and response scripts. Moreover, this module allows setting
+ static and dynamic module specific debug settings.
</para>
<para>
Debugging can be done from local or remote host via RPC interface (e.g.,
@@ -247,8 +248,11 @@ modparam("debugger", "step_loops", 100)
<title><varname>mod_hash_size</varname> (int)</title>
<para>
Used to compute power of two as size of internal hash table to store levels
- per module (e.g., if its set to 4, internal hash table has 16 slots). This
- parameter is accesible readonly via the Kamailio config framework.
+ per module (e.g., if its set to 4, internal hash table has 16 slots). One
+ must set it's value grater than 0 such that memory to be allocated
+ to save the module specific debug levels or facility configured by
+ <varname>mod_level</varname> or <varname>mod_facility</varname>.
+ This parameter is accesible readonly via the Kamailio config framework.
</para>
<para>
<emphasis>
@@ -306,6 +310,52 @@ modparam("debugger", "mod_level", "tm=3")
</example>
</section>
+ <section id="dbg.p.mod_facility_mode">
+ <title><varname>mod_facility_mode</varname> (int)</title>
+ <para>
+ Enable or disable per module log facility (0 - disabled, 1 - enabled).
+ This parameter is tunable via the Kamailio config framework. To use
+ per module log facility you also have to set <varname>mod_hash_size</varname>.
+ </para>
+ <para>
+ <emphasis>
+ Default value is <quote>0</quote>.
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>mod_facility_mode</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("debugger", "mod_facility_mode", 1)
+...
+ </programlisting>
+ </example>
+ </section>
+
+ <section id="dbg.p.mod_facility">
+ <title><varname>mod_facility</varname> (str)</title>
+ <para>
+ Specify module log facility - the value must be in the format:
+ modulename=facility. The parameter can be set many times. For core
+ log facility, use module name 'core'. You also must enable
+ <varname>mod_facility_mode</varname> and <varname>mod_hash_size</varname>.
+ </para>
+ <para>
+ NOTE: See the <emphasis>syslog()</emphasis> library call for facility names (http://linux.die.net/man/3/syslog).
+ The most used facilities are LOG_LOCAL[0-7].
+ </para>
+
+ <example>
+ <title>Set <varname>mod_facility</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("debugger", "mod_facility", "core=LOG_LOCAL0")
+modparam("debugger", "mod_facility", "debugger=LOG_LOCAL1")
+...
+ </programlisting>
+ </example>
+ </section>
+
<section id="dbg.p.log_assign">
<title><varname>log_assign</varname> (int)</title>
<para>
Module: kamailio
Branch: master
Commit: e5250430035b6e620dd1ac86d2fb9ebcbc717d84
URL: https://github.com/kamailio/kamailio/commit/e5250430035b6e620dd1ac86d2fb9eb…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro>
Committer: Stefan Mititelu <stefan.mititelu(a)1and1.ro>
Date: 2015-06-10T15:41:43+03:00
debugger: add support for static and dynamic, module specific, logging facility
Added two new debugger params which will support setting per module logging facility.
This is useful when one might want to change logging for a certain module to a different file.
mod_facility_mode (0/1) is used for enabling this. mod_facility (str) is used for
setting the facility.
---
Modified: dprint.c
Modified: dprint.h
Modified: modules/debugger/debugger_api.c
Modified: modules/debugger/debugger_api.h
Modified: modules/debugger/debugger_config.c
Modified: modules/debugger/debugger_config.h
Modified: modules/debugger/debugger_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/e5250430035b6e620dd1ac86d2fb9eb…
Patch: https://github.com/kamailio/kamailio/commit/e5250430035b6e620dd1ac86d2fb9eb…
Added 2 new params to the debugger module such as the per module facility logging is now possible.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/175
-- Commit Summary --
* debugger: add support for static and dynamic, module specific, logging facility
* debugger: updated documentation for the new facility parameters.
-- File Changes --
M dprint.c (45)
M dprint.h (17)
M modules/debugger/debugger_api.c (176)
M modules/debugger/debugger_api.h (2)
M modules/debugger/debugger_config.c (6)
M modules/debugger/debugger_config.h (3)
M modules/debugger/debugger_mod.c (47)
M modules/debugger/doc/debugger_admin.xml (58)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/175.patchhttps://github.com/kamailio/kamailio/pull/175.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/175