Export (0) Print
Expand All

Logging Page

Applies To: Windows Server 2008 R2

Use the Logging feature page to configure how IIS logs requests made to the Web server and when new log files are created.

UI Element List

The following tables describe the UI elements that are available on the feature page and in the Actions pane.

Feature Page Elements

 

Element Name Description

One log file per

Specifies whether the Web server maintains one log file for the whole server or one log file for each site on the server.

When you select Site, the settings that you specify on the Logging page at the server level are default values for all sites on your server. You can then open the Logging page at the site level to configure specific settings for a site.

Format

Specifies the format of the log file that is created when a request is logged.

When you configure the Web server to have one log file, you can select one of the following log file formats:

 

Value Description

Binary

Configures IIS to use the binary centralized logging format. By using this format, IIS creates one log file for all sites on the Web server. Every site writes request hit log information as binary unformatted data to this log file. Because this kind of logging conserves valuable memory and CPU resources, it is appropriate for use in an ISP environment, where Web servers can host many sites, or in any high-traffic situation.

noteNote
To extract data from this log file format, you must use a tool, such as LogParser 2.2.

W3C

Configures IIS to use the centralized W3C log file format to log information about all sites on the server. This format is handled by HTTP.sys, and is a customizable ASCII text-based format, which means that you specify the fields that are logged. Specify the fields that are logged on the W3C Logging Fields dialog box by clicking Select Fields on the Logging page. Fields are separated by spaces, and time is recorded in Coordinated Universal Time (UTC).

When you configure the Web server to have one log file per site, you can select one of the following log file formats:

 

Value Description

IIS

Configures IIS to use the Microsoft IIS log file format to log information about a site. This format is handled by HTTP.sys, and is a fixed ASCII text-based format, which means that you cannot customize the fields that are logged. Fields are separated by commas, and time is recorded as local time.

The following list is a list of fields that are logged when you use the IIS log file format:

  • Client IP address

  • User name

  • Date

  • Time

  • Service and instance

  • Server name

  • Server IP address

  • Time taken

  • Client bytes sent

  • Server bytes sent

  • Service status code (A value of 200 indicates that the request was fulfilled successfully.)

  • Windows status code (A value of 0 indicates that the request was fulfilled successfully.)

  • Request type

  • Target of operation

  • Parameters (the parameters that are passed to a script.)

Not all fields will contain data. When a field does not contain data, a hyphen (-) appears as a placeholder. When a field contains a non-printable character, HTTP.sys replaces it with a plus sign (+) to preserve the log file format.

NCSA

Configures IIS to use the National Center for Supercomputing Applications (NCSA) Common log file format to log information about a site. This format is handled by HTTP.sys, and is a fixed ASCII text-based format, which means that you cannot customize the fields that are logged. Fields are separated by spaces, and time is recorded as local time with the Coordinated Universal Time (UTC) offset.

The following list is a list of fields that are logged when you use the NCSA Common log file format:

  • Remote host address

  • Remote log name (This value is always a hyphen.)

  • User name

  • Date, time, and UTC offset

  • Request and protocol version

  • Service status code (A value of 200 indicates that the request was fulfilled successfully.)

  • Bytes sent

Not all fields will contain data. When a field does not contain data, a hyphen (-) appears as a placeholder. When a field contains a non-printable character, HTTP.sys replaces it with a plus sign (+) to preserve the log file format.

W3C

Use the W3C Extended log file format to log information about a site. This format is handled by HTTP.sys, and is a customizable ASCII text-based format, which means that you specify the fields that are logged. Specify the fields that are logged on the W3C Logging Fields dialog box by clicking Select Fields on the Logging page. Fields are separated by spaces, and time is recorded in Coordinated Universal Time (UTC).

Custom

Configures IIS to use a custom format for a custom logging module. When you select this option, the Logging page becomes disabled, because custom logging cannot be configured in IIS Manager.

Select Fields

Opens the W3C Logging Fields dialog box in which you can select which fields to log. This button is available only when the W3C log file format is selected.

Directory

Specifies the physical path where the log file or files are stored. The default value is %SystemDrive%\inetpub\logs\LogFiles.

Encoding

Specifies how the log file or log files are encoded: UTF-8 or ANSI.

Select UTF-8 when you want to enable both single-byte and multibyte characters in one string. This encoding enables you to read text-based logs, for example, W3C Extended, IIS, and National Center for Supercomputing Applications (NCSA) Common formats, in a language other than English. Additionally, if your Web server serves URLs in a language other than the one supported by the server's default code page, you should enable UTF-8 encoding for log content.

By default, IIS tries to serve URLs in code pages other than the server's default code page. For security reasons, you might want to enable the UTF-8 format to reduce the effect of an attack that could cause UTF-8 URLs not to translate correctly to the default code page.

Schedule

Configures IIS to create new log files based one of the following values:

  • Hourly: a new log file is created each hour.

  • Daily: a new log file is created each day.

  • Weekly: a new log file is created each week.

  • Monthly: a new log file is created each month.

Maximum file size (in bytes)

Configures IIS to create a new log file when the file reaches a certain size (in bytes).

The minimum file size is 1048576 bytes. If this attribute is set to a value less than 1048576 bytes, the default value is implicitly assumed as 1048576 bytes.

Do not create new log files

Configures IIS to not create new log files. This means that there is a single log file that will continue to grow as information is logged.

Use local time for file naming and rollover

Specifies that log file naming and time for log file rollover uses the local server time. When this is not selected, Coordinated Universal Time (UTC) is used.

noteNote
Regardless of this setting, timestamps in the actual log file will use the time format for the log format that you select from the Format list. For example, NCSA and W3C log file formats use UTC time format for timestamps.

Actions Pane Elements

 

Element Name Description

Apply

Saves the changes that you have made on the feature page.

Cancel

Cancels the changes that you have made on the feature page.

Disable

Disables the feature.

View Log Files

Opens the log file directory.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft