Compartilhar via


ILogScripting COM Interface

This section describes the ILogScripting interface, which is implemented by the IIS logging component, . The IIS logging component can be used from an administration script or ASP page to read and write IIS log files.

Note

The IIS logging component and the ILogScripting interface are deprecated. IIS 6.0 will be the last version that supports these features. For alternatives, see IIS Logging Overview.

If you want to create a custom component that implements the ILogScripting interface, you need to create an automation (IDispatch) object implementing the methods if the ILogScripting interface.

Your interface should be designed and implemented to handle only one log file query session per module instance. Therefore, each call to ILogScripting::SetInputLogFile and ILogScripting::SetInputServerInstance should reset the record read state.

ms524638.alert_caution(en-us,VS.90).gifImportant Note:

If you want a custom logging module to work with a component that implements ILogScripting, your custom logging module must provide support for automation data types and other basic automation features.

Methods in Vtable Order

The ILogScripting interface inherits the methods of the standard COM interface IUnknown.

The following methods are defined by the ILogScripting interface, and allow the caller to control what log records your custom logging module is reading.

Method

Description

CloseLogFiles

Closes all log files

ReadLogRecord

Reads the next available log record

SetInputLogFile

Sets the log file to be read

SetInputServerInstance

Specifies which server's log files should be read

SetOutputFile

Sets the log file to which log records should be written

WriteLogRecord

Writes a log record to the log file

Once the caller has used the methods described above to gain access to a particular log record, the following methods should become functional. These methods, implemented by your custom logging module, enable the caller to retrieve specific types of information from the log record.

Method

Description

ILogScripting::GetBytesRecvd

Retrieves the number of bytes received

ILogScripting::GetBytesSent

Retrieves the number of bytes sent

ILogScripting::GetClientHostName

Retrieves the client's host name

ILogScripting::GetClientUserName

Retrieves the user's name

ILogScripting::GetComputerName

Retrieves the computer name

ILogScripting::GetCustomFields

Retrieves the custom fields

ILogScripting::GetDateTime

Retrieves the date and time

ILogScripting::GetOperation

Retrieves the HTTP operation type

ILogScripting::GetParameters

Retrieves any parameters passed as part of the HTTP request

ILogScripting::GetPortNumber

Retrieves the port number

ILogScripting::GetProtocolStatus

Retrieves the HTTP protocol status code

ILogScripting::GetServerAddress

Retrieves the server's IP address

ILogScripting::GetSiteName

Retrieves the service name and server instance

ILogScripting::GetTarget

Retrieves the target string for the HTTP request

ILogScripting::GetTimeForProcessing

Retrieves the total processing time

ILogScripting::GetVersionString

Retrieves the version string

ILogScripting::GetWin32Status

Retrieves the Win32 status code

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS