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 57
    1.5. Set log_prefix parameter
55 58
    1.6. Set step_usleep parameter
56 59
    1.7. Set step_loops parameter
57
-   1.8. dbg_breakpoint usage
60
+   1.8. Set mod_hash_size parameter
61
+   1.9. Set mod_level_mode parameter
62
+   1.10. Set mod_level parameter
63
+   1.11. dbg_breakpoint usage
58 64
 
59 65
 Chapter 1. Admin Guide
60 66
 
... ...
@@ -75,6 +81,9 @@ Chapter 1. Admin Guide
75 81
         3.5. log_prefix (str)
76 82
         3.6. step_usleep (int)
77 83
         3.7. step_loops (int)
84
+        3.8. mod_hash_size (int)
85
+        3.9. mod_level_mode (int)
86
+        3.10. mod_level (str)
78 87
 
79 88
    4. Functions
80 89
 
... ...
@@ -136,6 +145,9 @@ Chapter 1. Admin Guide
136 145
    3.5. log_prefix (str)
137 146
    3.6. step_usleep (int)
138 147
    3.7. step_loops (int)
148
+   3.8. mod_hash_size (int)
149
+   3.9. mod_level_mode (int)
150
+   3.10. mod_level (str)
139 151
 
140 152
 3.1. cfgtrace (int)
141 153
 
... ...
@@ -223,11 +235,47 @@ modparam("debugger", "step_usleep", 500000)
223 235
 modparam("debugger", "step_loops", 100)
224 236
 ...
225 237
 
238
+3.8. mod_hash_size (int)
239
+
240
+   Used to compute power of two as size of internal hash table to store
241
+   levels per module (e.g., if its set to 4, internal hash table has 16
242
+   slots).
243
+
244
+   Default value is "0" - feature disabled.
245
+
246
+   Example 1.8. Set mod_hash_size parameter
247
+...
248
+modparam("debugger", "mod_hash_size", 5)
249
+...
250
+
251
+3.9. mod_level_mode (int)
252
+
253
+   Enable or disable per module log level (0 - disabled, 1 - enabled).
254
+
255
+   Default value is "0".
256
+
257
+   Example 1.9. Set mod_level_mode parameter
258
+...
259
+modparam("debugger", "mod_level_mode", 1)
260
+...
261
+
262
+3.10. mod_level (str)
263
+
264
+   Specify module log level - the value must be in the format:
265
+   modulename=level. The parameter can be set many times. For core log
266
+   level, use module name 'core'.
267
+
268
+   Example 1.10. Set mod_level parameter
269
+...
270
+modparam("debugger", "mod_level", "core=3")
271
+modparam("debugger", "mod_level", "tm=3")
272
+...
273
+
226 274
 4. Functions
227 275
 
228 276
    4.1. dbg_breakpoint(mode)
229 277
 
230
-4.1.  dbg_breakpoint(mode)
278
+4.1. dbg_breakpoint(mode)
231 279
 
232 280
    Anchor a breakpoint at the current line of the config (the one on which
233 281
    this function is called). The 'mode' specifies whether the breakpoint
... ...
@@ -236,7 +284,7 @@ modparam("debugger", "step_loops", 100)
236 284
    Note that this version of the module does not export this anchors to
237 285
    RPC for interactive debugging (temporarily disabled).
238 286
 
239
-   Example 1.8. dbg_breakpoint usage
287
+   Example 1.11. dbg_breakpoint usage
240 288
 ...
241 289
 if($si=="10.0.0.10")
242 290
         dbg_breakpoint("1");
... ...
@@ -248,7 +296,7 @@ if($si=="10.0.0.10")
248 296
    5.2. dbg.trace
249 297
    5.3. dbg.bp
250 298
 
251
-5.1.  dbg.ls
299
+5.1. dbg.ls
252 300
 
253 301
    List Kamailio processes with info related to interactive debugging.
254 302
 
... ...
@@ -262,7 +310,7 @@ if($si=="10.0.0.10")
262 310
                 dbg.ls
263 311
                 dbg.ls 1234
264 312
 
265
-5.2.  dbg.trace
313
+5.2. dbg.trace
266 314
 
267 315
    Control config script running trace.
268 316
 
... ...
@@ -279,7 +327,7 @@ if($si=="10.0.0.10")
279 327
                 dbg.trace off
280 328
                 dbg.trace on 1234
281 329
 
282
-5.3.  dbg.bp
330
+5.3. dbg.bp
283 331
 
284 332
    Control breakpoints and config execution.
285 333
 
... ...
@@ -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>