FTP Logging

 

Applies To: Windows Server 2012 R2, Windows Server 2012

Use the FTP Logging feature page to configure logging features at the server or site level, and to configure logging settings.

Related scenarios

In this document

UI Elements for FTP Logging

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 to use a single log file for the entire FTP server or to use separate log files on a site-by-site basis. The options are:

Server - Specifies that you use a single log file for the entire FTP server.

Site - Specifies that you use separate log files for each FTP site.

Note

Using a single log file for your server helps when you are using log parsing utilities. But if it becomes too large, a single log file could affect the overall performance of the FTP server.

Select W3C Fields

Displays the Information To Log dialog box.

Note

This version of the FTP server only supports W3C Extended Log File format.

Directory

Specifies the base folder to store log files.

Note

When you are using separate log files on a site-by-site basis, the base folder is appended with the service name and unique ID for the site. For example, these identifiers might be appended: FTPSVC1 or FTPSVC2.

Warning

When you specify a UNC path for the logging folder, make sure that you configure the permissions for the FTP service to create log files on the destination share.

Encoding

Specifies the file encoding for log files. The options are:

UTF8 - Enables both single-byte and multibyte characters in one string.

ANSI - Enables only single-byte characters in a string.

Note

UTF8-encoded log files enable you to read text-based entries in a language other than English. Additionally, if your FTP server serves URLs in a language other than the one supported by the server's default code page, enable UTF-8 encoding for log content.

Schedule

Specifies creating new log files that are based on a fixed time interval. The options are:

  • Hourly: Creates a log file every hour.

  • Daily: Creates a log file daily.

  • Weekly: Creates a log file each week.

  • Monthly: Creates a log file once a month.

Maximum file size (in bytes)

Specifies whether to create new log files when file size exceeds the maximum file size entered in the Maximum File Size box.

Do not create new log files

Specifies that you use the current log file without creating a new one. Selecting this option sets the size of the current log file to unlimited.

Note

Using a single log file for your server helps when you are using log parsing utilities. But if it becomes too large, a single log file could affect the overall performance of the FTP server.

Use local time for file naming and rollover

Specifies rotating the log files that are based on the local time zone (if using the Schedule option), instead of Coordinated Universal Time (UTC). By default, log files roll over at midnight UTC instead of at midnight according to the local time zone.

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 Logs

Opens the log file directory.

Information To Log Dialog Box

Use the Information to Log dialog box to configure the logging options or other content you want to include in your W3C Extended Log Files.

Element Name

Description

Date (date)

Logs the date on which the request occurred. Selected by default.

Time (time)

Logs the time, in Coordinated Universal Time (UTC), at which the request occurred. Selected by default.

Client IP Address (c-ip)

Logs the IP address of the client that made the request. Selected by default.

User Name (cs-username)

Logs the name of the authenticated user who accessed the server. Anonymous users are indicated by a hyphen. Selected by default.

Service Name (s-sitename)

Logs the internet service name and instance number that was running on the client at the time that the incident was logged.

Server Name (s-computername)

Logs the name of the server on which the log file entry was generated.

Server IP Address (s-ip)

Logs the IP address of the server on which the log file entry was generated. Selected by default.

Server Port (s-port)

Logs the server port number that is configured for the service. Selected by default.

Method (cs-method)

Logs the HTTP method, such as GET, that is used in the request. Selected by default.

URI Stem (cs-uri-stem)

Logs the Uniform Resource Identifier (URI) that is the target of the action. Selected by default.

Note

The URI for FTP requests usually applies only for a file or folder and does not log the full path of the file or folder. This makes reading log files difficult when you are working with a large volume of content. Because of this limitation, you can enable the Full Path field to list the detailed path information for the request.

Protocol Status (sc-status)

Logs the HTTP status code. Selected by default.

Win32 Status (sc-win32-status)

Logs the Windows status code. Selected by default.

Bytes Sent (sc-bytes)

Logs the number of bytes that the server sent.

Bytes Received (cs-bytes)

Logs the number of bytes that the server received.

Time Taken (time-taken)

Logs the length of time that the action took in milliseconds.

Server Port (s-port)

Logs the server port number that is configured for the service. Selected by default.

Host (cs-host)

Logs the host header name, if any.

Note

The host name that you configure for your website might appear differently in the log files because HTTP.sys logs host names by using the Punycode-encoded format. (Punycode encodes Unicode strings into the limited character set permitted in host names. For more information, see RFC 3492.)

Protocol Substatus (cs-substatus)

Logs the protocol version, HTTP or FTP, that the client used. Selected by default.

Session ID (x-session)

Logs the FTP session identifier for the client's session. Selected by default.

Full Path (x-fullpath)

Logs the full relative path from the FTP root directory for the target of the action. Selected by default.

Additional Information (x-debug)

Logs descriptive information for the sc-status code. For example, if the sc-status code is 552, the additional information logged may be "User disk quota exceeded."

Client Port (c-port)

Logs the port of the client that made the request.