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>
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>
20 <!-- Creator : groff version 1.17.2 -->
21 <!-- CreationDate: Fri Aug 30 16:16:19 2002 -->
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>
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 <pthr_http.h>
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>
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>
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>
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>
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
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 - "METHOD URL HTTP/x.y"
79 CODE length "Referer" "User
80 Agent"</td></table>
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 "-" is intended to store the HTTP auth
87 username, when HTTP authorization is supported by the
88 library. The "length" field is only known if the
89 caller sends back a "Content-Length" header.
90 Otherwise 0 is printed in that position.</td></table>
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>
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 <rich@annexia.org></td></table>
109 <a name="LICENSE"></a>
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>
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>
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