Share via


Log Formats

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

Four formats are available for transaction logs. The log formats and default file names are the same as those used by other IIS services. Plan what you want to track for all the services, how many files to use, and how to set file size before choosing a format for the SMTP service.

Microsoft IIS Log File Format

  • Information is written to a comma-delimited ASCII text file.

  • Data is fixed; you cannot customize the log.

  • There are multiple records for a single transmission.

NCSA Common Log File Format

  • Information is written to an ASCII text file that uses the National Center for Supercomputing Applications (NCSA) format.

  • Data is fixed; you cannot customize the log.

  • There are multiple records for a single transmission.

W3C Extended Log File Format

  • The World Wide Web Consortium (W3C) Extended Log File Format is the default logging format for the SMTP service, as well as other IIS services.

  • Data is variable; you can choose what you want to track.

  • This format is a good option for limiting log size.

  • Information is written to an ASCII text file.

  • This format includes some field options that apply to the Web and file transfer protocol (FTP) services only.

  • There are multiple entries for a single transmission.

ODBC Logging

  • You must set up an open database connectivity (ODBC)-compliant database before using this format.

  • Information is written to a database.

  • There are multiple records for a single transmission.

The following table describes the fields and data types for an ODBC transaction log file.

Field name Data type Description

ClientHost

varchar(255)

Client IP address

Username

varchar(255)

Client domain name

LogTime

datetime

Connection date and time

Service

varchar(255)

Internet Information Services (IIS) service

Machine

varchar(255)

Computer name

ServerIP

varchar(50)

Server IP address

ProcessingTime

Integer

Processing time in milliseconds

BytesRecvd

integer

Bytes received by server

BytesSent

Integer

Bytes sent by server

ServiceStatus

Integer

Simple Mail Transfer Protocol (SMTP) protocol reply code

Win32Status

integer

Windows Server 2003 status or error code (a 0 valueindicates success)

Operation

varchar(255)

SMTP protocol command

Target

varchar(255)

Recipient

Parameters

varchar(255)