AppendToLog

The AppendToLog method adds a string to the end of the Web server log entry for this request. You can call it multiple times in one section of script. Each time the method is called it appends the specified string to the existing entry.

Syntax

Response.AppendToLog string

Parameters
string
The text to append to the log file. Because fields in the log are comma-delimited, this string cannot contain any comma characters (,).
Remarks

In order for the specified string to be recorded in the log file, you must enable the URI Query option of the Extended Properties property sheet for the site whose activity you wish to log. To access this property sheet, from the IIS Snap-in, right-click the Web site, and select Properties. On the Web site tab, verify that Enable Logging is selected, and click Properties. Note the default settings on the Extended Properties property sheet. For more information on configuring W3C Extended Logging, see Customizing W3C Extended Logging.

Example

The following example adds the text "content updated" to the log file.

<% Response.AppendToLog "My custom log message" %>
Applies To

Response Object


© 1997-2001 Microsoft Corporation. All rights reserved.