File:
[Public] /
libwww /
Library /
src /
HTLog.html
Revision
2.17:
download - view:
text,
annotated -
select for diffs
Thu May 14 02:10:40 1998 UTC (26 years ago) by
frystyk
Branches:
MAIN
CVS tags:
repeat-requests,
before_webdav,
Release-5-4-0,
Release-5-3-1,
Release-5-2-8,
Release-5-2-6,
Release-5-2,
Release-5-1m,
HEAD,
Before-New-Trace-Messages,
Amaya_2_4,
Amaya-6-3,
Amaya-6-1,
Amaya-5-2,
Amaya-4-3-2,
Amaya-4-3-1,
Amaya-4-3,
Amaya-4-1-2,
Amaya-4-1-0,
Amaya-4-0-0,
Amaya-3-2-1,
Amaya-3-2,
Amaya
Changing old pub/WWW links
<HTML>
<HEAD>
<TITLE>W3C Sample Code Library libwww Log Class</TITLE>
</HEAD>
<BODY>
<H1>Log Manager</H1>
<PRE>
/*
** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH.
*/
</PRE>
This is a generic log object which can be used to log events to a file.<P>
This module is implemented by <A HREF="HTLog.c">HTLog.c</A>, and it is
a part of the <A HREF="http://www.w3.org/Library/"> W3C
Sample Code Library</A>.
<PRE>
#ifndef HTLIBLOG_H
#define HTLIBLOG_H
#include "HTReq.h"
</PRE>
<H2>Create a new Log Object</H2>
Create a new object and open the log file. The time used in the log file
is either GMT or local dependent on <CODE>local</CODE>.
<PRE>
typedef struct _HTLog HTLog;
extern HTLog * HTLog_open (const char * filename, BOOL local, BOOL append);
</PRE>
<H2>Delete a Log Object</H2>
Close the log file and delete the object
<PRE>
extern BOOL HTLog_close (HTLog * log);
</PRE>
<H2>How many times has log object been accessed?</h2>
Returns access count number or -1
<PRE>
extern int HTLog_accessCount (HTLog * log);
</PRE>
<H2>Log a Client Request in CLF</H2>
This functions logs the result of a request in what's close to CLF. It can
be used on client side to track user behavior.
<PRE>
extern BOOL HTLog_addCLF (HTLog * log, HTRequest * request, int status);
</PRE>
<H2>Log Referer Fields</H2>
This functions logs the referer logs of where the user has been.
<PRE>
extern BOOL HTLog_addReferer (HTLog * log, HTRequest * request, int status);
</PRE>
<H2>Log the following line</H2>
A generic logger - logs whatever you put in as the line. The caller
is responsible for adding a line feed if desired.
<PRE>
extern BOOL HTLog_addLine (HTLog * log, const char * line);
</PRE>
<H2>Log the Following Variable Arguments</H2>
A generic logger with variable arguments
<PRE>
extern BOOL HTLog_addText (HTLog * log, const char * fmt, ...);
</PRE>
<PRE>
#endif
</PRE>
<HR>
<ADDRESS>
@(#) $Id: HTLog.html,v 2.17 1998/05/14 02:10:40 frystyk Exp $
</ADDRESS>
</BODY>
</HTML>
Webmaster