Răsfoiți Sursa

debugger: documented new parameters related to per module log level

Daniel-Constantin Mierla 12 ani în urmă
părinte
comite
86fce4b7b5
2 a modificat fișierele cu 112 adăugiri și 6 ștergeri
  1. 54 6
      modules/debugger/README
  2. 58 0
      modules/debugger/doc/debugger_admin.xml

+ 54 - 6
modules/debugger/README

@@ -32,6 +32,9 @@ Daniel-Constantin Mierla
               3.5. log_prefix (str)
               3.5. log_prefix (str)
               3.6. step_usleep (int)
               3.6. step_usleep (int)
               3.7. step_loops (int)
               3.7. step_loops (int)
+              3.8. mod_hash_size (int)
+              3.9. mod_level_mode (int)
+              3.10. mod_level (str)
 
 
         4. Functions
         4. Functions
 
 
@@ -54,7 +57,10 @@ Daniel-Constantin Mierla
    1.5. Set log_prefix parameter
    1.5. Set log_prefix parameter
    1.6. Set step_usleep parameter
    1.6. Set step_usleep parameter
    1.7. Set step_loops parameter
    1.7. Set step_loops parameter
-   1.8. dbg_breakpoint usage
+   1.8. Set mod_hash_size parameter
+   1.9. Set mod_level_mode parameter
+   1.10. Set mod_level parameter
+   1.11. dbg_breakpoint usage
 
 
 Chapter 1. Admin Guide
 Chapter 1. Admin Guide
 
 
@@ -75,6 +81,9 @@ Chapter 1. Admin Guide
         3.5. log_prefix (str)
         3.5. log_prefix (str)
         3.6. step_usleep (int)
         3.6. step_usleep (int)
         3.7. step_loops (int)
         3.7. step_loops (int)
+        3.8. mod_hash_size (int)
+        3.9. mod_level_mode (int)
+        3.10. mod_level (str)
 
 
    4. Functions
    4. Functions
 
 
@@ -136,6 +145,9 @@ Chapter 1. Admin Guide
    3.5. log_prefix (str)
    3.5. log_prefix (str)
    3.6. step_usleep (int)
    3.6. step_usleep (int)
    3.7. step_loops (int)
    3.7. step_loops (int)
+   3.8. mod_hash_size (int)
+   3.9. mod_level_mode (int)
+   3.10. mod_level (str)
 
 
 3.1. cfgtrace (int)
 3.1. cfgtrace (int)
 
 
@@ -223,11 +235,47 @@ modparam("debugger", "step_usleep", 500000)
 modparam("debugger", "step_loops", 100)
 modparam("debugger", "step_loops", 100)
 ...
 ...
 
 
+3.8. mod_hash_size (int)
+
+   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).
+
+   Default value is "0" - feature disabled.
+
+   Example 1.8. Set mod_hash_size parameter
+...
+modparam("debugger", "mod_hash_size", 5)
+...
+
+3.9. mod_level_mode (int)
+
+   Enable or disable per module log level (0 - disabled, 1 - enabled).
+
+   Default value is "0".
+
+   Example 1.9. Set mod_level_mode parameter
+...
+modparam("debugger", "mod_level_mode", 1)
+...
+
+3.10. mod_level (str)
+
+   Specify module log level - the value must be in the format:
+   modulename=level. The parameter can be set many times. For core log
+   level, use module name 'core'.
+
+   Example 1.10. Set mod_level parameter
+...
+modparam("debugger", "mod_level", "core=3")
+modparam("debugger", "mod_level", "tm=3")
+...
+
 4. Functions
 4. Functions
 
 
    4.1. dbg_breakpoint(mode)
    4.1. dbg_breakpoint(mode)
 
 
-4.1.  dbg_breakpoint(mode)
+4.1. dbg_breakpoint(mode)
 
 
    Anchor a breakpoint at the current line of the config (the one on which
    Anchor a breakpoint at the current line of the config (the one on which
    this function is called). The 'mode' specifies whether the breakpoint
    this function is called). The 'mode' specifies whether the breakpoint
@@ -236,7 +284,7 @@ modparam("debugger", "step_loops", 100)
    Note that this version of the module does not export this anchors to
    Note that this version of the module does not export this anchors to
    RPC for interactive debugging (temporarily disabled).
    RPC for interactive debugging (temporarily disabled).
 
 
-   Example 1.8. dbg_breakpoint usage
+   Example 1.11. dbg_breakpoint usage
 ...
 ...
 if($si=="10.0.0.10")
 if($si=="10.0.0.10")
         dbg_breakpoint("1");
         dbg_breakpoint("1");
@@ -248,7 +296,7 @@ if($si=="10.0.0.10")
    5.2. dbg.trace
    5.2. dbg.trace
    5.3. dbg.bp
    5.3. dbg.bp
 
 
-5.1.  dbg.ls
+5.1. dbg.ls
 
 
    List Kamailio processes with info related to interactive debugging.
    List Kamailio processes with info related to interactive debugging.
 
 
@@ -262,7 +310,7 @@ if($si=="10.0.0.10")
                 dbg.ls
                 dbg.ls
                 dbg.ls 1234
                 dbg.ls 1234
 
 
-5.2.  dbg.trace
+5.2. dbg.trace
 
 
    Control config script running trace.
    Control config script running trace.
 
 
@@ -279,7 +327,7 @@ if($si=="10.0.0.10")
                 dbg.trace off
                 dbg.trace off
                 dbg.trace on 1234
                 dbg.trace on 1234
 
 
-5.3.  dbg.bp
+5.3. dbg.bp
 
 
    Control breakpoints and config execution.
    Control breakpoints and config execution.
 
 

+ 58 - 0
modules/debugger/doc/debugger_admin.xml

@@ -223,6 +223,64 @@ modparam("debugger", "step_loops", 100)
 	    </example>
 	    </example>
 	</section>
 	</section>
 
 
+	<section>
+	    <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).
+	    </para>
+	    <para>
+		<emphasis>
+		    Default value is <quote>0</quote> - feature disabled.
+		</emphasis>
+	    </para>
+	    <example>
+		<title>Set <varname>mod_hash_size</varname> parameter</title>
+		<programlisting format="linespecific">
+...
+modparam("debugger", "mod_hash_size", 5)
+...
+</programlisting>
+	    </example>
+	</section>
+
+	<section>
+	    <title><varname>mod_level_mode</varname> (int)</title>
+	    <para>
+        Enable or disable per module log level (0 - disabled, 1 - enabled).
+	    </para>
+	    <para>
+		<emphasis>
+		    Default value is <quote>0</quote>.
+		</emphasis>
+	    </para>
+	    <example>
+		<title>Set <varname>mod_level_mode</varname> parameter</title>
+		<programlisting format="linespecific">
+...
+modparam("debugger", "mod_level_mode", 1)
+...
+</programlisting>
+	    </example>
+	</section>
+
+	<section>
+	    <title><varname>mod_level</varname> (str)</title>
+	    <para>
+		Specify module log level - the value must be in the format:
+		modulename=level. The parameter can be set many times. For core
+		log level, use module name 'core'.
+	    </para>
+	    <example>
+		<title>Set <varname>mod_level</varname> parameter</title>
+		<programlisting format="linespecific">
+...
+modparam("debugger", "mod_level", "core=3")
+modparam("debugger", "mod_level", "tm=3")
+...
+</programlisting>
+	    </example>
+	</section>
 	</section>
 	</section>
 	
 	
     <section>
     <section>