Debugging & Logging section



Debugging Output Settings page

Use the Debugging Settings and Debugging IPs pages to configure ColdFusion to provide debugging information for every application page that a browser request. Specify debugging preferences by using the pages as follows:

  • On the Debugging Settings page, select debugging output options. If debugging is enabled, the output appears in block format after normal page output.

  • On the Debugging IPs page, restrict access to debugging output. If a debugging option is enabled, debugging output is visible to all users by default.

Note: Enabling debugging affects performance. It is advised that you do not enable debugging on a production server.

The Debug Output Settings page provides the following debugging options:

Option

Description

Enable Robust Exception Information

Displays detailed information in the exceptions page, including the physical path and URI of the template, the line number and snippet, the SQL statement used (if any), the data source name (if any), and the Java stack trace.

Enable Request Debugging Output

Enables the ColdFusion debugging service.

Select Debugging Output Format

Controls debugging format. Select either of the following formats:

  • classic.cfm The format available in ColdFusion 5 and earlier. It provides a basic view and few browser restrictions.

  • dockable.cfm A dockable tree-based debugging panel. For details about the panel and browser restrictions, see the online Help.

Report Execution Times

Reports execution times that exceed a specified time limit.

General Debug Information

Show general information about the ColdFusion MX version, template, timestamp, user locale, user agent, user IP, and host name.

Database Activity

Shows the database activity for the SQL Query events and Stored Procedure events in the debugging output.

Exception Information

Shows all ColdFusion exceptions raised for the request in the debugging output.

Tracing Information

Shows trace event information in the debugging output. Tracing lets you track program flow and efficiency using the cftrace tag.

Timer Information

Shows output from the cftimer tag.

Flash Form Compile Errors And Messages

(Development use only) Displays ActionScript errors in the browser when Flash forms are compiling, and affects the display time of the page.

Variables

Displays information about parameters, URL parameters, cookies, sessions, and CGI variables in the debugging output.

Enable Performance Monitoring

(Server configuration only)

Enables the standard NT Performance Monitor application to display information about a running server.

TIP: Restart ColdFusion after you change this setting.

Enable CFSTAT

(Server configuration only)

Shows performance information on platforms that do not support the NT Performance Monitor. For more information, see Using the cfstat utility.

TIP: Restart ColdFusion after you change this setting.

Using the cfstat utility

The cfstat command-line utility provides real-time performance metrics for ColdFusion. The cfstat utility uses a socket connection to obtain metric data. You can use the cfstat utility to display information that ColdFusion writes to the System Monitor without using the System Monitor application. The following table lists the metrics that the cfstat utility returns:

Metric abbreviation

Metric name

Description

Pg/Sec

Page hits per second

The number of ColdFusion pages processed per second. You can reduce this limit by moving static content to HTML pages.

DB/Sec

Database accesses per second

The number of database accesses per second that ColdFusion makes. Any difference in complexity and resource load between calls is ignored.

Req Q'ed

Number of queued requests

The number of requests that are currently waiting for ColdFusion to process them. Lower values, which you can achieve with efficient CFML, are better.

Req Run'g

Number of running requests

The number of requests that ColdFusion is currently actively processing.

Req TO'ed

Number of timed out requests

The total number of ColdFusion requests that have timed out. Lower values, which you can achieve by aggressive caching, removing unnecessary dynamic operations and third-party events, are better.

AvgQ Time

Average queue time

A running average of the time, in milliseconds, that requests wait for ColdFusion to process them. Lower values, which you can achieve with efficient CFML and enhanced caching, are better.

AvgReq Time

Average request time

A running average of the time, in milliseconds, that it takes ColdFusion to process a request (including queued time). Lower values, which you can achieve with efficient CFML, are better.

AvgDB Time

Average database transaction time

A running average of the time that ColdFusion spends on database-related processing of ColdFusion requests.

Bytes In/Sec

Bytes incoming per second

The number of bytes that ColdFusion read in the last second (not an average).

Bytes Out/Sec

Bytes outgoing per second

The number of bytes that ColdFusion wrote in the last second (not an average).

Before you use the cfstat utility, ensure that you selected the Enable Performance Monitoring option in the ColdFusion Administrator (on the Debugging & Logging > Debugging Settings page). If you select this option, restart ColdFusion for this change to take effect.

cfstat options

The cf_root/bin directory contains the cfstat utility. From that directory, type cfstat and use the following switches:

Switch

Description

Comment

-n

Suppress column headers.

Useful for saving output to a file.

-s

Display output in a single line.

Display a single line and delay display of the first line so the cfstat utility can display meaningful values in the per-second counters.

#

Where # is an integer, display output every # seconds.

If you do not specify an integer, the cfstat utility returns one line. Specify this switch with or without the ‑s switch.

This example runs the cfstat utility and displays a new line every 20 seconds:

cfstat 20

Debugging IP Addresses page

Use the Debugging IP Addresses page to restrict debugging output to one or more IP addresses. You can add and remove IP addresses.

Note: If you do not specify IP addresses, and debugging options are active, ColdFusion displays debugging output for all users.

Debugger Settings page

To use the ColdFusion Debugger that runs in Eclipse, select the Allow Line Debugging option.

Specify the port and the maximum number of simultaneous debugging sessions. Specify the debugger port in the JVM settings of your application server, for example:

-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=#portNum#

To stop a currently running debugging session, click Stop Debugging.

For the changes that you specify on this page to take effect, restart the ColdFusion server.

Logging Settings page

Use the Logging Settings page of the Administrator to change ColdFusion logging options. The following table describes the settings:

Option

Description

Log Directory

Specifies the directory to which error log files are written.

TIP: Restart ColdFusion after you change this setting.

Maximum File Size (kb)

Sets the maximum file size for log files. When a file reaches this limit, it automatically is archived.

Maximum Number Of Archives

Sets the maximum number of log archives to create. When they reach this limit, files are deleted in the order of oldest to newest.

Log Slow Pages Taking Longer Than [n] Seconds

Logs the names of pages that take longer than the specified interval to process. Logging slow pages can help you diagnose potential problems or bottlenecks in your ColdFusion applications. Entries are written to the server.log file.

Log All CORBA Calls

Logs all CORBA calls.

Enable Logging For Scheduled Tasks

Logs ColdFusion Executive task scheduling.

Log Files page

The Log Files page lets you perform operations on log files, such as searching, viewing, downloading, archiving, and deleting.

Click a Log File icon located in the Actions column of the Available Log Files table, to search, view, download, archive, or delete a log file.

For more information, see the ColdFusion Administrator online Help.

The following table describes the ColdFusion log files:

Log file

Description

rdservice.log

Records errors that occur in the ColdFusion Remote Development Service (RDS). RDS provides remote HTTP-based access to files and databases.

application.log

Records every ColdFusion error reported to a user. Application page errors, including ColdFusion syntax, ODBC, and SQL errors, are written to this log file.

exception.log

Records stack traces for exceptions that occur in ColdFusion.

scheduler.log

Records scheduled events that have been submitted for execution. Indicates whether task submission was initiated and whether it succeeded. Provides the scheduled page URL, the date and time executed, and a task ID.

eventgateway.log

Records events and errors related to event gateways.

migration.log

Records errors related to upgrading from a previous version of ColdFusion.

migrationException.log

Records errors related to running ColdFusion applications after upgrading from a previous version of ColdFusion.

server.log

Records errors for ColdFusion.

customtag.log

Records errors generated in custom tag processing.

car.log

Records errors associated with site archive and restore operations.

mail.log

Records errors generated by an SMTP mail server.

mailsent.log

Records messages that ColdFusion sends.

flash.log

Records entries for Flash® Remoting.

Scheduled Tasks page

Use the Scheduled Tasks page to schedule the execution of local and remote web pages, to generate static HTML pages, send mail with the cfmail tag, update database tables, index Verity collections, delete temporary files, and any other batch-style processing. The scheduling facility is useful for applications that do not require user interactions or customized output. ColdFusion developers use this facility to schedule daily sales reports, corporate directories, statistical reports, and so on.

Information that is read more often than written is a good candidate for scheduled tasks. Instead of executing a query to a database every time the page is requested, ColdFusion renders the static page with information that the scheduled event generates. Response time is faster because no database transaction takes place.

You can run scheduled tasks once; on a specified date; or at a specified time, daily, weekly, or monthly; daily; at a specified interval; or between specified dates.

The Scheduled Task page lets you create, edit, pause, resume, and delete scheduled tasks. For more information, see the Online Help.

System Probes page

System probes help you evaluate the status of your ColdFusion applications. Like scheduled tasks, they access a URL at a specified interval, but they can also check for the presence or absence of a string in the URL. If the URL contents are unexpected, or if an error occurred while accessing the URL, the probe can send an e-mail alert to the address specified on the System Probes page. The probe can also execute a script to perform a recovery action, such as restarting the server. All probe actions are logged in the logs/probes.log file. The System Probes page also displays the status of each probe.

Use the buttons in the Actions column in the System Probes table to perform the following actions:

Action

Description

Edit

Lets you edit the probe.

Run

Runs the probe immediately, even if it was previously disabled.

Enable/Disable

Starts and stops the probe from automatically executing at its specified interval.

Delete

Deletes the probe.

Because probes run as scheduled ColdFusion tasks, they do not run if the server on which they are hosted crashes, or if the host web server crashes or otherwise does not respond.

System probes are available in ColdFusion Enterprise Edition only.

Code Analyzer page

The Code Analyzer page evaluates your ColdFusion pages for potential incompatibilities between ColdFusion 9 and previous versions of ColdFusion. It reviews the CFML pages that you specify and informs you of any potential compatibility issues. Additionally, the Code Compatibility Analyzer detects unsupported and deprecated CFML features, and outlines the required implementation changes that ensure a smooth migration

License Scanner page

The License Scanner page searches the local subnet to find other running instances of ColdFusion. You can use this information to determine whether the ColdFusion instances within the subnet are licensed appropriately.

The ColdFusion Administrator uses universal datagram protocol (UDP) multicast to collect license and version information from all ColdFusion instances running within the subnet.