[This is preliminary documentation and subject to change]

Logging Utility Component

The IIS Log component is used to create an IISLog object, which enables 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.

important Important    The user accessing the ASP script that instantiates the IISLog 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.

File Names
Logscrpt.dllThe Logging Utility component

Syntax

SetoIISLog= Server.CreateObject( MSWC.IISLog )

 

Parameters
oIISLog
Specifies the name that can be used as a reference to the IISLog component.
Methods
AtEndOflogIndicates whether all records have been read from the log file.
CloseLogFilesCloses all open log files.
OpenLogFileOpens a log file for reading or writing.
ReadFilterFilters records from the log file by date and time.
ReadLogRecordReads the next available log record from the current log file.
WriteLogRecordWrites a log record to the current log file.

Properties
BytesReceivedIndicates the bytes received.
BytesSentIndicates the bytes sent.
ClientIPIndicates the client's host name.
CookieIndicates the client's cookie.
CustomFieldsIndicates an array of custom headers
DateTimeIndicates the date and time in GMT.
MethodIndicates the operation type.
ProtocolStatusIndicates the protocol status.
ProtocolVersionIndicates the version string.
RefererIndicates the referrer page.
ServerIPIndicates the server's IP address.
ServerNameIndicates the server name.
ServerPortIndicates the port number.
ServiceNameIndicates the service name.
TimeTakenIndicates the total processing time.
URIQueryIndicates any parameters passed with the request.
URIStemIndicates the target URL.
UserAgentIndicates the user agent string.
UserNameIndicates the user's name.
Win32StatusIndicates the Win32 status code.

note Note    The following steps are necessary to use the IIS Log component effectively:

important Important    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.


© 1997-2001 Microsoft Corporation. All rights reserved.