Browse code

debugger: documented new parameters related to per module log level

Daniel-Constantin Mierla authored on 17/05/2013 08:12:00
Showing 2 changed files
... ...
@@ -32,6 +32,9 @@ Daniel-Constantin Mierla
32 32
               3.5. log_prefix (str)
33 33
               3.6. step_usleep (int)
34 34
               3.7. step_loops (int)
35
+              3.8. mod_hash_size (int)
36
+              3.9. mod_level_mode (int)
37
+              3.10. mod_level (str)
35 38
 
36 39
         4. Functions
37 40
 
... ...
@@ -54,7 +57,10 @@ Daniel-Constantin Mierla
54 54
    1.5. Set log_prefix parameter
55 55
    1.6. Set step_usleep parameter
56 56
    1.7. Set step_loops parameter
57
-   1.8. dbg_breakpoint usage
57
+   1.8. Set mod_hash_size parameter
58
+   1.9. Set mod_level_mode parameter
59
+   1.10. Set mod_level parameter
60
+   1.11. dbg_breakpoint usage
58 61
 
59 62
 Chapter 1. Admin Guide
60 63
 
... ...
@@ -75,6 +81,9 @@ Chapter 1. Admin Guide
75 75
         3.5. log_prefix (str)
76 76
         3.6. step_usleep (int)
77 77
         3.7. step_loops (int)
78
+        3.8. mod_hash_size (int)
79
+        3.9. mod_level_mode (int)
80
+        3.10. mod_level (str)
78 81
 
79 82
    4. Functions
80 83
 
... ...
@@ -136,6 +145,9 @@ Chapter 1. Admin Guide
136 136
    3.5. log_prefix (str)
137 137
    3.6. step_usleep (int)
138 138
    3.7. step_loops (int)
139
+   3.8. mod_hash_size (int)
140
+   3.9. mod_level_mode (int)
141
+   3.10. mod_level (str)
139 142
 
140 143
 3.1. cfgtrace (int)
141 144
 
... ...
@@ -223,11 +235,47 @@ modparam("debugger", "step_usleep", 500000)
223 223
 modparam("debugger", "step_loops", 100)
224 224
 ...
225 225
 
226
+3.8. mod_hash_size (int)
227
+
228
+   Used to compute power of two as size of internal hash table to store
229
+   levels per module (e.g., if its set to 4, internal hash table has 16
230
+   slots).
231
+
232
+   Default value is "0" - feature disabled.
233
+
234
+   Example 1.8. Set mod_hash_size parameter
235
+...
236
+modparam("debugger", "mod_hash_size", 5)
237
+...
238
+
239
+3.9. mod_level_mode (int)
240
+
241
+   Enable or disable per module log level (0 - disabled, 1 - enabled).
242
+
243
+   Default value is "0".
244
+
245
+   Example 1.9. Set mod_level_mode parameter
246
+...
247
+modparam("debugger", "mod_level_mode", 1)
248
+...
249
+
250
+3.10. mod_level (str)
251
+
252
+   Specify module log level - the value must be in the format:
253
+   modulename=level. The parameter can be set many times. For core log
254
+   level, use module name 'core'.
255
+
256
+   Example 1.10. Set mod_level parameter
257
+...
258
+modparam("debugger", "mod_level", "core=3")
259
+modparam("debugger", "mod_level", "tm=3")
260
+...
261
+
226 262
 4. Functions
227 263
 
228 264
    4.1. dbg_breakpoint(mode)
229 265
 
230
-4.1.  dbg_breakpoint(mode)
266
+4.1. dbg_breakpoint(mode)
231 267
 
232 268
    Anchor a breakpoint at the current line of the config (the one on which
233 269
    this function is called). The 'mode' specifies whether the breakpoint
... ...
@@ -236,7 +284,7 @@ modparam("debugger", "step_loops", 100)
236 236
    Note that this version of the module does not export this anchors to
237 237
    RPC for interactive debugging (temporarily disabled).
238 238
 
239
-   Example 1.8. dbg_breakpoint usage
239
+   Example 1.11. dbg_breakpoint usage
240 240
 ...
241 241
 if($si=="10.0.0.10")
242 242
         dbg_breakpoint("1");
... ...
@@ -248,7 +296,7 @@ if($si=="10.0.0.10")
248 248
    5.2. dbg.trace
249 249
    5.3. dbg.bp
250 250
 
251
-5.1.  dbg.ls
251
+5.1. dbg.ls
252 252
 
253 253
    List Kamailio processes with info related to interactive debugging.
254 254
 
... ...
@@ -262,7 +310,7 @@ if($si=="10.0.0.10")
262 262
                 dbg.ls
263 263
                 dbg.ls 1234
264 264
 
265
-5.2.  dbg.trace
265
+5.2. dbg.trace
266 266
 
267 267
    Control config script running trace.
268 268
 
... ...
@@ -279,7 +327,7 @@ if($si=="10.0.0.10")
279 279
                 dbg.trace off
280 280
                 dbg.trace on 1234
281 281
 
282
-5.3.  dbg.bp
282
+5.3. dbg.bp
283 283
 
284 284
    Control breakpoints and config execution.
285 285
 
... ...
@@ -223,6 +223,64 @@ modparam("debugger", "step_loops", 100)
223 223
 	    </example>
224 224
 	</section>
225 225
 
226
+	<section>
227
+	    <title><varname>mod_hash_size</varname> (int)</title>
228
+	    <para>
229
+		Used to compute power of two as size of internal hash table to store levels
230
+		per module (e.g., if its set to 4, internal hash table has 16 slots).
231
+	    </para>
232
+	    <para>
233
+		<emphasis>
234
+		    Default value is <quote>0</quote> - feature disabled.
235
+		</emphasis>
236
+	    </para>
237
+	    <example>
238
+		<title>Set <varname>mod_hash_size</varname> parameter</title>
239
+		<programlisting format="linespecific">
240
+...
241
+modparam("debugger", "mod_hash_size", 5)
242
+...
243
+</programlisting>
244
+	    </example>
245
+	</section>
246
+
247
+	<section>
248
+	    <title><varname>mod_level_mode</varname> (int)</title>
249
+	    <para>
250
+        Enable or disable per module log level (0 - disabled, 1 - enabled).
251
+	    </para>
252
+	    <para>
253
+		<emphasis>
254
+		    Default value is <quote>0</quote>.
255
+		</emphasis>
256
+	    </para>
257
+	    <example>
258
+		<title>Set <varname>mod_level_mode</varname> parameter</title>
259
+		<programlisting format="linespecific">
260
+...
261
+modparam("debugger", "mod_level_mode", 1)
262
+...
263
+</programlisting>
264
+	    </example>
265
+	</section>
266
+
267
+	<section>
268
+	    <title><varname>mod_level</varname> (str)</title>
269
+	    <para>
270
+		Specify module log level - the value must be in the format:
271
+		modulename=level. The parameter can be set many times. For core
272
+		log level, use module name 'core'.
273
+	    </para>
274
+	    <example>
275
+		<title>Set <varname>mod_level</varname> parameter</title>
276
+		<programlisting format="linespecific">
277
+...
278
+modparam("debugger", "mod_level", "core=3")
279
+modparam("debugger", "mod_level", "tm=3")
280
+...
281
+</programlisting>
282
+	    </example>
283
+	</section>
226 284
 	</section>
227 285
 	
228 286
     <section>