Annotation of libwww/Library/src/HTLog.html, revision 2.16
2.1 frystyk 1: <HTML>
2: <HEAD>
2.13 frystyk 3: <TITLE>W3C Sample Code Library libwww Log Class</TITLE>
2.1 frystyk 4: </HEAD>
5: <BODY>
6:
7: <H1>Log Manager</H1>
8:
9: <PRE>
10: /*
2.2 frystyk 11: ** (c) COPYRIGHT MIT 1995.
2.1 frystyk 12: ** Please first read the full copyright statement in the file COPYRIGH.
13: */
14: </PRE>
15:
2.13 frystyk 16: This is a generic log object which can be used to log events to a file.<P>
2.1 frystyk 17:
18: This module is implemented by <A HREF="HTLog.c">HTLog.c</A>, and it is
2.7 frystyk 19: a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
2.12 frystyk 20: Sample Code Library</A>.
2.1 frystyk 21:
22: <PRE>
23: #ifndef HTLIBLOG_H
24: #define HTLIBLOG_H
25:
2.6 frystyk 26: #include "HTReq.h"
2.1 frystyk 27: </PRE>
28:
2.13 frystyk 29: <H2>Create a new Log Object</H2>
2.1 frystyk 30:
2.13 frystyk 31: Create a new object and open the log file. The time used in the log file
2.1 frystyk 32: is either GMT or local dependent on <CODE>local</CODE>.
33:
34: <PRE>
2.13 frystyk 35: typedef struct _HTLog HTLog;
36:
37: extern HTLog * HTLog_open (const char * filename, BOOL local, BOOL append);
2.1 frystyk 38: </PRE>
39:
2.13 frystyk 40: <H2>Delete a Log Object</H2>
2.1 frystyk 41:
2.13 frystyk 42: Close the log file and delete the object
2.1 frystyk 43:
44: <PRE>
2.13 frystyk 45: extern BOOL HTLog_close (HTLog * log);
2.8 frystyk 46: </PRE>
47:
2.16 ! frystyk 48: <H2>How many times has log object been accessed?</h2>
! 49:
! 50: Returns access count number or -1
! 51:
! 52: <PRE>
! 53: extern int HTLog_accessCount (HTLog * log);
! 54: </PRE>
! 55:
2.13 frystyk 56: <H2>Log a Client Request in CLF</H2>
57:
58: This functions logs the result of a request in what's close to CLF. It can
59: be used on client side to track user behavior.
2.8 frystyk 60:
61: <PRE>
2.13 frystyk 62: extern BOOL HTLog_addCLF (HTLog * log, HTRequest * request, int status);
2.1 frystyk 63: </PRE>
64:
2.14 frystyk 65: <H2>Log Referer Fields</H2>
66:
67: This functions logs the referer logs of where the user has been.
68:
69: <PRE>
70: extern BOOL HTLog_addReferer (HTLog * log, HTRequest * request, int status);
71: </PRE>
72:
2.13 frystyk 73: <H2>Log the following line</H2>
2.1 frystyk 74:
2.13 frystyk 75: A generic logger - logs whatever you put in as the line. The caller
76: is responsible for adding a line feed if desired.
2.1 frystyk 77:
78: <PRE>
2.13 frystyk 79: extern BOOL HTLog_addLine (HTLog * log, const char * line);
80: </PRE>
2.1 frystyk 81:
2.15 frystyk 82: <H2>Log the Following Variable Arguments</H2>
83:
84: A generic logger with variable arguments
85:
86: <PRE>
87: extern BOOL HTLog_addText (HTLog * log, const char * fmt, ...);
88: </PRE>
89:
2.13 frystyk 90: <PRE>
2.1 frystyk 91: #endif
92: </PRE>
93:
2.11 frystyk 94: <HR>
95: <ADDRESS>
2.16 ! frystyk 96: @(#) $Id: HTLog.html,v 2.15 1998/01/21 17:24:40 frystyk Exp $
2.11 frystyk 97: </ADDRESS>
2.1 frystyk 98: </BODY>
99: </HTML>
Webmaster