Comments/Troubleshooting

Once you've instantiated the Logging Utility component, reading a log file record consists of the following steps:

  1. Open the log file you wish to read by calling the OpenLogFile method.Optionally, set a filter to limit the accessible records by calling the ReadFilter method.

  2. Check whether there are any valid records left to read by calling the AtEndOfLog method. (Typically, this operation is performed at the beginning of a Do loop.)

  3. Navigate to a log record by calling the ReadLogRecord method. This updates the component's property values with the current record's field values.

  4. Perform the desired operation(s) on data from the current record.

  5. Repeat steps 2-4 as needed.

When you are done, you should close the log file by calling the CloseLogFiles method.

The use of the Logging Utility component is straightforward. The only restriction on its use is that the user accessing the script containing the use of the Logging Utility component must be authenticated and have either administrator writes over the machine running the web server or be an operator of the site (configured in IIS). If a client using only anonymous access attempts to use a Logging Utility script, the component will not function properly and the web server log files cannot be succesfully accessed.

Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.