This file is indexed.

/usr/share/gtk-doc/html/libsoup-2.4/SoupLogger.html is in libsoup2.4-doc 2.44.2-1ubuntu2.3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>libsoup Reference Manual: SoupLogger</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch03.html" title="Additional Features">
<link rel="prev" href="SoupCookieJarDB.html" title="SoupCookieJarDB">
<link rel="next" href="SoupProxyResolverDefault.html" title="SoupProxyResolverDefault">
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
                  <a href="#SoupLogger.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
                  <a href="#SoupLogger.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> 
                  <a href="#SoupLogger.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="SoupCookieJarDB.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="SoupProxyResolverDefault.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="SoupLogger"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="SoupLogger.top_of_page"></a>SoupLogger</span></h2>
<p>SoupLogger — Debug logging support</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="SoupLogger.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="SoupLogger.html" title="SoupLogger"><span class="returnvalue">SoupLogger</span></a> *
</td>
<td class="function_name">
<a class="link" href="SoupLogger.html#soup-logger-new" title="soup_logger_new ()">soup_logger_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupLogger.html#soup-logger-attach" title="soup_logger_attach ()">soup_logger_attach</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupLogger.html#soup-logger-detach" title="soup_logger_detach ()">soup_logger_detach</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupLogger.html#SoupLoggerLogLevel" title="enum SoupLoggerLogLevel"><span class="returnvalue">SoupLoggerLogLevel</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="SoupLogger.html#SoupLoggerFilter" title="SoupLoggerFilter ()">*SoupLoggerFilter</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupLogger.html#soup-logger-set-request-filter" title="soup_logger_set_request_filter ()">soup_logger_set_request_filter</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupLogger.html#soup-logger-set-response-filter" title="soup_logger_set_response_filter ()">soup_logger_set_response_filter</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="SoupLogger.html#SoupLoggerPrinter" title="SoupLoggerPrinter ()">*SoupLoggerPrinter</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="SoupLogger.html#soup-logger-set-printer" title="soup_logger_set_printer ()">soup_logger_set_printer</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="SoupLogger.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="SoupLogger.html#SoupLogger-struct" title="SoupLogger">SoupLogger</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="SoupLogger.html#SoupLoggerLogLevel" title="enum SoupLoggerLogLevel">SoupLoggerLogLevel</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="SoupLogger.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
    <span class="lineart">╰──</span> SoupLogger
</pre>
</div>
<div class="refsect1">
<a name="SoupLogger.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
SoupLogger implements
 <a class="link" href="SoupSessionFeature.html" title="SoupSessionFeature">SoupSessionFeature</a>.</p>
</div>
<div class="refsect1">
<a name="SoupLogger.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libsoup/soup.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="SoupLogger.description"></a><h2>Description</h2>
<p><a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a> watches a <a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a> and logs the HTTP traffic that
it generates, for debugging purposes. Many applications use an
environment variable to determine whether or not to use
<a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a>, and to determine the amount of debugging output.</p>
<p>To use <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a>, first create a logger with <a class="link" href="SoupLogger.html#soup-logger-new" title="soup_logger_new ()"><code class="function">soup_logger_new()</code></a>,
optionally configure it with <a class="link" href="SoupLogger.html#soup-logger-set-request-filter" title="soup_logger_set_request_filter ()"><code class="function">soup_logger_set_request_filter()</code></a>,
<a class="link" href="SoupLogger.html#soup-logger-set-response-filter" title="soup_logger_set_response_filter ()"><code class="function">soup_logger_set_response_filter()</code></a>, and <a class="link" href="SoupLogger.html#soup-logger-set-printer" title="soup_logger_set_printer ()"><code class="function">soup_logger_set_printer()</code></a>,
and then attach it to a session (or multiple sessions) with
<a class="link" href="SoupSession.html#soup-session-add-feature" title="soup_session_add_feature ()"><code class="function">soup_session_add_feature()</code></a>.</p>
<p>By default, the debugging output is sent to
<code class="literal">stdout</code>, and looks something like:</p>
<div class="informalexample"><pre class="screen">
&gt; POST /unauth HTTP/1.1
&gt; Soup-Debug-Timestamp: 1200171744
&gt; Soup-Debug: SoupSessionAsync 1 (0x612190), SoupMessage 1 (0x617000), SoupSocket 1 (0x612220)
&gt; Host: localhost
&gt; Content-Type: text/plain
&gt; Connection: close
&gt; 
&gt; This is a test.
  
&lt; HTTP/1.1 201 Created
&lt; Soup-Debug-Timestamp: 1200171744
&lt; Soup-Debug: SoupMessage 1 (0x617000)
&lt; Date: Sun, 12 Jan 2008 21:02:24 GMT
&lt; Content-Length: 0
</pre></div>
<p>The <code class="literal">Soup-Debug-Timestamp</code> line gives the time (as
a <span class="type">time_t</span>) when the request was sent, or the response fully
received.</p>
<p>The <code class="literal">Soup-Debug</code> line gives further debugging
information about the <a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a>, <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>, and <a class="link" href="SoupSocket.html" title="SoupSocket"><span class="type">SoupSocket</span></a>
involved; the hex numbers are the addresses of the objects in
question (which may be useful if you are running in a debugger).
The decimal IDs are simply counters that uniquely identify objects
across the lifetime of the <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a>. In particular, this can be
used to identify when multiple messages are sent across the same
connection.</p>
<p>Currently, the request half of the message is logged just before
the first byte of the request gets written to the network (from the
<a class="link" href="SoupSession.html#SoupSession-request-started" title="The “request-started” signal"><span class="type">“request_started”</span></a> signal), which means that if you have
not made the complete request body available at that point, it will
not be logged.</p>
<p>The response is logged just after the last byte of the response
body is read from the network (from the <a class="link" href="SoupMessage.html#SoupMessage-got-body" title="The “got-body” signal"><span class="type">“got_body”</span></a> or
<a class="link" href="SoupMessage.html#SoupMessage-got-informational" title="The “got-informational” signal"><span class="type">“got_informational”</span></a> signal), which means that the
<a class="link" href="SoupMessage.html#SoupMessage-got-headers" title="The “got-headers” signal"><span class="type">“got_headers”</span></a> signal, and anything triggered off it
(such as <a class="link" href="SoupSession.html#SoupSession-authenticate" title="The “authenticate” signal"><span class="type">“authenticate”</span></a>) will be emitted
<span class="emphasis"><em>before</em></span> the response headers are actually
logged.</p>
<p>If the response doesn't happen to trigger the
<a class="link" href="SoupMessage.html#SoupMessage-got-body" title="The “got-body” signal"><span class="type">“got_body”</span></a> nor <a class="link" href="SoupMessage.html#SoupMessage-got-informational" title="The “got-informational” signal"><span class="type">“got_informational”</span></a> signals
due to, for example, a cancellation before receiving the last byte
of the response body, the response will still be logged on the
event of the <a class="link" href="SoupMessage.html#SoupMessage-finished" title="The “finished” signal"><span class="type">“finished”</span></a> signal.</p>
</div>
<div class="refsect1">
<a name="SoupLogger.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="soup-logger-new"></a><h3>soup_logger_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupLogger.html" title="SoupLogger"><span class="returnvalue">SoupLogger</span></a> *
soup_logger_new (<em class="parameter"><code><a class="link" href="SoupLogger.html#SoupLoggerLogLevel" title="enum SoupLoggerLogLevel"><span class="type">SoupLoggerLogLevel</span></a> level</code></em>,
                 <em class="parameter"><code><span class="type">int</span> max_body_size</code></em>);</pre>
<p>Creates a new <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a> with the given debug level. If <em class="parameter"><code>level</code></em>
 is
<a class="link" href="SoupLogger.html#SOUP-LOGGER-LOG-BODY:CAPS"><code class="literal">SOUP_LOGGER_LOG_BODY</code></a>, <em class="parameter"><code>max_body_size</code></em>
 gives the maximum number of
bytes of the body that will be logged. (-1 means "no limit".)</p>
<p>If you need finer control over what message parts are and aren't
logged, use <a class="link" href="SoupLogger.html#soup-logger-set-request-filter" title="soup_logger_set_request_filter ()"><code class="function">soup_logger_set_request_filter()</code></a> and
<a class="link" href="SoupLogger.html#soup-logger-set-response-filter" title="soup_logger_set_response_filter ()"><code class="function">soup_logger_set_response_filter()</code></a>.</p>
<div class="refsect3">
<a name="id-1.4.9.9.2.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>level</p></td>
<td class="parameter_description"><p>the debug level</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>max_body_size</p></td>
<td class="parameter_description"><p>the maximum body size to output, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.9.9.2.7"></a><h4>Returns</h4>
<p> a new <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a></p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-logger-attach"></a><h3>soup_logger_attach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_logger_attach (<em class="parameter"><code><a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a> *logger</code></em>,
                    <em class="parameter"><code><a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a> *session</code></em>);</pre>
<div class="warning">
<p><code class="literal">soup_logger_attach</code> is deprecated and should not be used in newly-written code.</p>
<p>Use <a class="link" href="SoupSession.html#soup-session-add-feature" title="soup_session_add_feature ()"><code class="function">soup_session_add_feature()</code></a> instead.</p>
</div>
<p>Sets <em class="parameter"><code>logger</code></em>
 to watch <em class="parameter"><code>session</code></em>
 and print debug information for
its messages.</p>
<p>(The session will take a reference on <em class="parameter"><code>logger</code></em>
, which will be
removed when you call <a class="link" href="SoupLogger.html#soup-logger-detach" title="soup_logger_detach ()"><code class="function">soup_logger_detach()</code></a>, or when the session is
destroyed.)</p>
<div class="refsect3">
<a name="id-1.4.9.9.3.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>logger</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>session</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-logger-detach"></a><h3>soup_logger_detach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_logger_detach (<em class="parameter"><code><a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a> *logger</code></em>,
                    <em class="parameter"><code><a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a> *session</code></em>);</pre>
<div class="warning">
<p><code class="literal">soup_logger_detach</code> is deprecated and should not be used in newly-written code.</p>
<p>Use <a class="link" href="SoupSession.html#soup-session-remove-feature" title="soup_session_remove_feature ()"><code class="function">soup_session_remove_feature()</code></a> instead.</p>
</div>
<p>Stops <em class="parameter"><code>logger</code></em>
 from watching <em class="parameter"><code>session</code></em>
.</p>
<div class="refsect3">
<a name="id-1.4.9.9.4.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>logger</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>session</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupSession.html" title="SoupSession"><span class="type">SoupSession</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="SoupLoggerFilter"></a><h3>SoupLoggerFilter ()</h3>
<pre class="programlisting"><a class="link" href="SoupLogger.html#SoupLoggerLogLevel" title="enum SoupLoggerLogLevel"><span class="returnvalue">SoupLoggerLogLevel</span></a>
<span class="c_punctuation">(</span>*SoupLoggerFilter<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a> *logger</code></em>,
                     <em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>,
                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>The prototype for a logging filter. The filter callback will be
invoked for each request or response, and should analyze it and
return a <a class="link" href="SoupLogger.html#SoupLoggerLogLevel" title="enum SoupLoggerLogLevel"><span class="type">SoupLoggerLogLevel</span></a> value indicating how much of the
message to log. Eg, it might choose between <a class="link" href="SoupLogger.html#SOUP-LOGGER-LOG-BODY:CAPS"><code class="literal">SOUP_LOGGER_LOG_BODY</code></a>
and <a class="link" href="SoupLogger.html#SOUP-LOGGER-LOG-HEADERS:CAPS"><code class="literal">SOUP_LOGGER_LOG_HEADERS</code></a> depending on the Content-Type.</p>
<div class="refsect3">
<a name="id-1.4.9.9.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>logger</p></td>
<td class="parameter_description"><p>the <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>the message being logged</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the data passed to <a class="link" href="SoupLogger.html#soup-logger-set-request-filter" title="soup_logger_set_request_filter ()"><code class="function">soup_logger_set_request_filter()</code></a>
or <a class="link" href="SoupLogger.html#soup-logger-set-response-filter" title="soup_logger_set_response_filter ()"><code class="function">soup_logger_set_response_filter()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.9.9.5.6"></a><h4>Returns</h4>
<p> a <a class="link" href="SoupLogger.html#SoupLoggerLogLevel" title="enum SoupLoggerLogLevel"><span class="type">SoupLoggerLogLevel</span></a> value indicating how much of
the message to log</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-logger-set-request-filter"></a><h3>soup_logger_set_request_filter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_logger_set_request_filter (<em class="parameter"><code><a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a> *logger</code></em>,
                                <em class="parameter"><code><a class="link" href="SoupLogger.html#SoupLoggerFilter" title="SoupLoggerFilter ()"><span class="type">SoupLoggerFilter</span></a> request_filter</code></em>,
                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> filter_data</code></em>,
                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>Sets up a filter to determine the log level for a given request.
For each HTTP request <em class="parameter"><code>logger</code></em>
 will invoke <em class="parameter"><code>request_filter</code></em>
 to
determine how much (if any) of that request to log. (If you do not
set a request filter, <em class="parameter"><code>logger</code></em>
 will just always log requests at the
level passed to <a class="link" href="SoupLogger.html#soup-logger-new" title="soup_logger_new ()"><code class="function">soup_logger_new()</code></a>.)</p>
<div class="refsect3">
<a name="id-1.4.9.9.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>logger</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>request_filter</p></td>
<td class="parameter_description"><p>the callback for request debugging</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filter_data</p></td>
<td class="parameter_description"><p>data to pass to the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> to free <em class="parameter"><code>filter_data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-logger-set-response-filter"></a><h3>soup_logger_set_response_filter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_logger_set_response_filter (<em class="parameter"><code><a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a> *logger</code></em>,
                                 <em class="parameter"><code><a class="link" href="SoupLogger.html#SoupLoggerFilter" title="SoupLoggerFilter ()"><span class="type">SoupLoggerFilter</span></a> response_filter</code></em>,
                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> filter_data</code></em>,
                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>Sets up a filter to determine the log level for a given response.
For each HTTP response <em class="parameter"><code>logger</code></em>
 will invoke <em class="parameter"><code>response_filter</code></em>
 to
determine how much (if any) of that response to log. (If you do not
set a response filter, <em class="parameter"><code>logger</code></em>
 will just always log responses at
the level passed to <a class="link" href="SoupLogger.html#soup-logger-new" title="soup_logger_new ()"><code class="function">soup_logger_new()</code></a>.)</p>
<div class="refsect3">
<a name="id-1.4.9.9.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>logger</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_filter</p></td>
<td class="parameter_description"><p>the callback for response debugging</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filter_data</p></td>
<td class="parameter_description"><p>data to pass to the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> to free <em class="parameter"><code>filter_data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="SoupLoggerPrinter"></a><h3>SoupLoggerPrinter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*SoupLoggerPrinter<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a> *logger</code></em>,
                      <em class="parameter"><code><a class="link" href="SoupLogger.html#SoupLoggerLogLevel" title="enum SoupLoggerLogLevel"><span class="type">SoupLoggerLogLevel</span></a> level</code></em>,
                      <em class="parameter"><code><span class="type">char</span> direction</code></em>,
                      <em class="parameter"><code>const <span class="type">char</span> *data</code></em>,
                      <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>The prototype for a custom printing callback.</p>
<p><em class="parameter"><code>level</code></em>
 indicates what kind of information is being printed. Eg, it
will be <a class="link" href="SoupLogger.html#SOUP-LOGGER-LOG-HEADERS:CAPS"><code class="literal">SOUP_LOGGER_LOG_HEADERS</code></a> if <em class="parameter"><code>data</code></em>
 is header data.</p>
<p><em class="parameter"><code>direction</code></em>
 is either '&lt;', '&gt;', or ' ', and <em class="parameter"><code>data</code></em>
 is the single line
to print; the printer is expected to add a terminating newline.</p>
<p>To get the effect of the default printer, you would do:</p>
<div class="informalexample"><pre class="programlisting">
printf ("%c %s\n", direction, data);
</pre></div>
<div class="refsect3">
<a name="id-1.4.9.9.8.9"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>logger</p></td>
<td class="parameter_description"><p>the <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>level</p></td>
<td class="parameter_description"><p>the level of the information being printed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>direction</p></td>
<td class="parameter_description"><p>a single-character prefix to <em class="parameter"><code>data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>data to print</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>the data passed to <a class="link" href="SoupLogger.html#soup-logger-set-printer" title="soup_logger_set_printer ()"><code class="function">soup_logger_set_printer()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-logger-set-printer"></a><h3>soup_logger_set_printer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
soup_logger_set_printer (<em class="parameter"><code><a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a> *logger</code></em>,
                         <em class="parameter"><code><a class="link" href="SoupLogger.html#SoupLoggerPrinter" title="SoupLoggerPrinter ()"><span class="type">SoupLoggerPrinter</span></a> printer</code></em>,
                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> printer_data</code></em>,
                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>Sets up an alternate log printing routine, if you don't want
the log to go to <code class="literal">stdout</code>.</p>
<div class="refsect3">
<a name="id-1.4.9.9.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>logger</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupLogger.html" title="SoupLogger"><span class="type">SoupLogger</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>printer</p></td>
<td class="parameter_description"><p>the callback for printing logging output</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>printer_data</p></td>
<td class="parameter_description"><p>data to pass to the callback</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> to free <em class="parameter"><code>printer_data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="SoupLogger.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="SoupLogger-struct"></a><h3>SoupLogger</h3>
<pre class="programlisting">typedef struct _SoupLogger SoupLogger;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="SoupLoggerLogLevel"></a><h3>enum SoupLoggerLogLevel</h3>
<p>Describes the level of logging output to provide.</p>
<div class="refsect3">
<a name="id-1.4.9.10.3.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="SOUP-LOGGER-LOG-NONE:CAPS"></a>SOUP_LOGGER_LOG_NONE</p></td>
<td class="enum_member_description">
<p>No logging</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="SOUP-LOGGER-LOG-MINIMAL:CAPS"></a>SOUP_LOGGER_LOG_MINIMAL</p></td>
<td class="enum_member_description">
<p>Log the Request-Line or Status-Line and
the Soup-Debug pseudo-headers</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="SOUP-LOGGER-LOG-HEADERS:CAPS"></a>SOUP_LOGGER_LOG_HEADERS</p></td>
<td class="enum_member_description">
<p>Log the full request/response headers</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="SOUP-LOGGER-LOG-BODY:CAPS"></a>SOUP_LOGGER_LOG_BODY</p></td>
<td class="enum_member_description">
<p>Log the full headers and request/response
bodies.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.20</div>
</body>
</html>