Add to git.
[pthrlib.git] / doc / http_get_log_file.3.html
1 <html>
2 <head>
3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
4 <meta name="Content-Style" content="text/css">
5 <title>http_set_log_file</title>
6 </head>
7 <body>
8
9 <h1 align=center>http_set_log_file</h1>
10 <a href="#NAME">NAME</a><br>
11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
13 <a href="#BUGS">BUGS</a><br>
14 <a href="#AUTHOR">AUTHOR</a><br>
15 <a href="#LICENSE">LICENSE</a><br>
16 <a href="#VERSION">VERSION</a><br>
17 <a href="#SEE ALSO">SEE ALSO</a><br>
18
19 <hr>
20 <!-- Creator     : groff version 1.17.2 -->
21 <!-- CreationDate: Fri Aug 30 16:16:19 2002 -->
22 <a name="NAME"></a>
23 <h2>NAME</h2>
24 <table width="100%" border=0 rules="none" frame="void"
25        cols="2" cellspacing="0" cellpadding="0">
26 <tr valign="top" align="left">
27 <td width="10%"></td><td width="90%">
28 http_set_log_file, http_get_log_file - enable HTTP logs on file pointer</td></table>
29 <a name="SYNOPSIS"></a>
30 <h2>SYNOPSIS</h2>
31
32 <table width="100%" border=0 rules="none" frame="void"
33        cols="2" cellspacing="0" cellpadding="0">
34 <tr valign="top" align="left">
35 <td width="10%"></td><td width="90%">
36 <pre><b>#include &lt;pthr_http.h&gt;
37
38 FILE *http_set_log_file (FILE *fp);
39 FILE *http_get_log_file (void);
40 </b></pre></td></table>
41 <a name="DESCRIPTION"></a>
42 <h2>DESCRIPTION</h2>
43
44 <table width="100%" border=0 rules="none" frame="void"
45        cols="2" cellspacing="0" cellpadding="0">
46 <tr valign="top" align="left">
47 <td width="10%"></td><td width="90%">
48 The <b>FILE *fp</b> argument to <b>http_set_log_file</b>
49 sets the file pointer on which HTTP logs are generated. To
50 disable logging, set <b>fp</b> to <b>NULL</b>. The function
51 returns <b>fp</b>.</td></table>
52
53 <table width="100%" border=0 rules="none" frame="void"
54        cols="2" cellspacing="0" cellpadding="0">
55 <tr valign="top" align="left">
56 <td width="10%"></td><td width="90%">
57 <b>http_get_log_file</b> returns the current file pointer or
58 <b>NULL</b> if logging is disabled.</td></table>
59
60 <table width="100%" border=0 rules="none" frame="void"
61        cols="2" cellspacing="0" cellpadding="0">
62 <tr valign="top" align="left">
63 <td width="10%"></td><td width="90%">
64 The default is that logging is disabled.</td></table>
65
66 <table width="100%" border=0 rules="none" frame="void"
67        cols="2" cellspacing="0" cellpadding="0">
68 <tr valign="top" align="left">
69 <td width="10%"></td><td width="90%">
70 Currently log messages are generated at the end of the HTTP
71 response headers and have the following fixed
72 format:</td></table>
73
74 <table width="100%" border=0 rules="none" frame="void"
75        cols="2" cellspacing="0" cellpadding="0">
76 <tr valign="top" align="left">
77 <td width="10%"></td><td width="90%">
78 YYYY/MM/DD HH:MM ip:port - &quot;METHOD URL HTTP/x.y&quot;
79 CODE length &quot;Referer&quot; &quot;User
80 Agent&quot;</td></table>
81
82 <table width="100%" border=0 rules="none" frame="void"
83        cols="2" cellspacing="0" cellpadding="0">
84 <tr valign="top" align="left">
85 <td width="10%"></td><td width="90%">
86 The first &quot;-&quot; is intended to store the HTTP auth
87 username, when HTTP authorization is supported by the
88 library. The &quot;length&quot; field is only known if the
89 caller sends back a &quot;Content-Length&quot; header.
90 Otherwise 0 is printed in that position.</td></table>
91 <a name="BUGS"></a>
92 <h2>BUGS</h2>
93
94 <table width="100%" border=0 rules="none" frame="void"
95        cols="2" cellspacing="0" cellpadding="0">
96 <tr valign="top" align="left">
97 <td width="10%"></td><td width="90%">
98 Log format should be customizable. It should be possible
99 (optionally, of course) to look up the IP address and print
100 a hostname.</td></table>
101 <a name="AUTHOR"></a>
102 <h2>AUTHOR</h2>
103
104 <table width="100%" border=0 rules="none" frame="void"
105        cols="2" cellspacing="0" cellpadding="0">
106 <tr valign="top" align="left">
107 <td width="10%"></td><td width="90%">
108 Richard Jones &lt;rich@annexia.org&gt;</td></table>
109 <a name="LICENSE"></a>
110 <h2>LICENSE</h2>
111
112 <table width="100%" border=0 rules="none" frame="void"
113        cols="2" cellspacing="0" cellpadding="0">
114 <tr valign="top" align="left">
115 <td width="10%"></td><td width="90%">
116 GNU LGPL (see http://www.gnu.org/)</td></table>
117 <a name="VERSION"></a>
118 <h2>VERSION</h2>
119
120 <table width="100%" border=0 rules="none" frame="void"
121        cols="2" cellspacing="0" cellpadding="0">
122 <tr valign="top" align="left">
123 <td width="10%"></td><td width="90%">
124 pthrlib-3.0.3</td></table>
125 <a name="SEE ALSO"></a>
126 <h2>SEE ALSO</h2>
127
128 <table width="100%" border=0 rules="none" frame="void"
129        cols="2" cellspacing="0" cellpadding="0">
130 <tr valign="top" align="left">
131 <td width="10%"></td><td width="90%">
132 <b>new_http_request(3)</b>, <b>new_cgi(3)</b>,
133 <b>new_pseudothread(3)</b>, <b>io_fdopen(3)</b>, RFC
134 2616.</td></table>
135 <hr>
136 </body>
137 </html>