2025-04-27 07:49:33 -04:00

234 lines
8.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>Logging Utility</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
TempString = navigator.appVersion
if (navigator.appName == "Microsoft Internet Explorer"){
// Check to see if browser is Microsoft
if (TempString.indexOf ("4.") >= 0){
// Check to see if it is IE 4
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
}
else {
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
}
}
else if (navigator.appName == "Netscape") {
// Check to see if browser is Netscape
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
}
else
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
//-->
</script>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Window_OnLoad()
Dim frmContents
On Error Resume Next
If Not Parent Is Nothing Then
Set frmContents = Parent.Contents
If Not frmContents Is Nothing Then
frmContents.Window.TOCSynch_Click
End If
End If
End Sub
//--></SCRIPT><META NAME="DESCRIPTION" CONTENT="Internet Information Services reference information">
<META HTTP-EQUIV="PICS-Label" CONTENT='(PICS-1.1 "<http://www.rsac.org/ratingsv01.html>" l comment "RSACi North America Server" by "inet@microsoft.com <mailto:inet@microsoft.com>" r (n 0 s 0 v 0 l 0))'>
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META NAME="MS-IT-LOC" Content="Internet Information Services">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1><A NAME="_logging_utility"></A><SUP></SUP>Logging Utility Component</H1>
<P>The IIS Log component is used to create an <B>IISLog </B>object, which enables<B> </B>your applications to read from the IIS log. This component allows you to quickly create, for example, ASP scripts or VB components that programmatically walk through daily log files so that certain types of information can be extracted.</P>
<P><span class=le><B>Important&nbsp;&nbsp;&nbsp;</B></span>The user accessing the ASP script that instantiates the <B>IISLog</B> component must be authenticated as an Administrator or Operator on the server on which IIS is running. If the user is only anonymous, the IIS Log component will not function properly.</P>
<H6>File Names</H6>
<TABLE border=0 cellpadding=5 cols=2 frame=box rules=cols>
<TR VALIGN="top">
<TD width=50%>Logscrpt.dll</TD>
<TD width=50%>The Logging Utility component</TD>
</TR>
</TABLE><BR>
<H6>Syntax</H6>
<P><B>Set </B><I>oVar</I><B> = Server.CreateObject( MSWC.IISLog ) </B></P>
<P><B>&nbsp;</B></P>
<H6>Parameters</H6>
<DL>
<DT><I>oVar</I></DT>
<DD>Specifies the name that can be used as a reference to the <B>IISLog </B>component.</DD>
</DL>
<H6>Methods</H6>
<TABLE border=0 cellpadding=5 cols=2 frame=box rules=all>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp4rzb.htm">AtEndOfLog</A></TD>
<TD width=50%>Indicates whether all records have been read from the log file.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp5dtf.htm">CloseLogFiles</A></TD>
<TD width=50%>Closes all open log files.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp6hnp.htm">OpenLogFile</A></TD>
<TD width=50%>Opens a log file for reading or writing.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp1cqa.htm">ReadFilter</A></TD>
<TD width=50%>Filters records from the log file by date and time.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp6jms.htm">ReadLogRecord</A></TD>
<TD width=50%>Reads the next available log record from the current log file.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp4290.htm">WriteLogRecord</A></TD>
<TD width=50%>Writes a log record to the current log file.</TD>
</TR>
</TABLE><BR>
<H6>Properties</H6>
<TABLE border=0 cellpadding=5 cols=2 frame=box rules=all>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp6xt0.htm">BytesReceived</A></TD>
<TD width=50%>Indicates the bytes received.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp7dv8.htm">BytesSent</A></TD>
<TD width=50%>Indicates the bytes sent.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp4d2o.htm">ClientIP</A></TD>
<TD width=50%>Indicates the client's host name.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp8wf9.htm">Cookie</A></TD>
<TD width=50%>Indicates the client's cookie.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp7k37.htm">CustomFields</A></TD>
<TD width=50%>Indicates an array of custom headers</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp5smd.htm">DateTime</A></TD>
<TD width=50%>Indicates the date and time in GMT.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp0xpg.htm">Method</A></TD>
<TD width=50%>Indicates the operation type.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp735f.htm">ProtocolStatus</A></TD>
<TD width=50%>Indicates the protocol status.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp0g8e.htm">ProtocolVersion</A></TD>
<TD width=50%>Indicates the version string.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp3epe.htm">Referer</A></TD>
<TD width=50%>Indicates the referrer page.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp7ohc.htm">ServerIP</A></TD>
<TD width=50%>Indicates the server's IP address.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp4dk5.htm">ServerName</A></TD>
<TD width=50%>Indicates the server name.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp6ulw.htm">ServerPort</A></TD>
<TD width=50%>Indicates the port number.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp32g5.htm">ServiceName</A></TD>
<TD width=50%>Indicates the service name.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp052m.htm">TimeTaken</A></TD>
<TD width=50%>Indicates the total processing time.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp254p.htm">URIQuery</A></TD>
<TD width=50%>Indicates any parameters passed with the request.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp3u7h.htm">URIStem</A></TD>
<TD width=50%>Indicates the target URL.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp20hg.htm">UserAgent</A></TD>
<TD width=50%>Indicates the user agent string.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp2vc5.htm">UserName</A></TD>
<TD width=50%>Indicates the user's name.</TD>
</TR>
<TR VALIGN="top">
<TD width=50%><A HREF="/iishelp/iis/htm/asp/comp6yer.htm">Win32Status</A></TD>
<TD width=50%>Indicates the Win32 status code.</TD>
</TR>
</TABLE><BR>
<H6>Remarks</H6>
<P>The following steps are necessary to use the IIS Log component effectively:
<OL>
<LI>Use the <B>OpenLogFile</B> method to specify from which log file or files the <B>IISLog </B>component should read.</li>
<LI>Use the <B>ReadLogRecord</B> to read the appropriate log records.</li>
<LI>Use the IIS Log component properties to retrieve specific information from the log records.</li>
</OL>
<P><span class=le><B>Important&nbsp;&nbsp;&nbsp;</B></span>Only log files created by logging modules that support log file reading will be accessible through this component. The four built-in logging modules that come with IIS support log-file reading, but if you are using a custom or third-party logging module, you will need to enhance the logging module. </P>
<hr class="iis" size="1">
<p align="center"><em><a href="../../../common/colegal.htm">&copy; 1997-1999 Microsoft Corporation. All rights reserved.</a></em></p>
</BODY>
</HTML>