Debugging & Logging section

Debugging settings overview

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 Output Settings page, select debugging output options. If debugging is enabled, the output appears in block format after normal page output.

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

  • On the Logging Settings page, specify a directory for error log files that can contain useful debugging information.

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

Debugging Output Settings page

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. Averages are displayed for the last two completed requests.

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. Averages are displayed for the last two completed requests.

AvgDB Time

Average database transaction time

A running average of the time that ColdFusion spends on database-related processing of ColdFusion requests. Averages are displayed for the last two completed 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.

-x

Display extended output breaking of different request threads.

Available in ColdFusion Enterprise. It is ignored in ColdFusion Standard.

-port

Allows you to specify the port to which ColdFusion listens for cfstat communications.

 

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.

To add a debugging IP address,

  1. In the Debugging IP Addresses page, enter an IP address that you want to receive debugging output. The default IP address is 127.0.0.1.

  2. Click Add.

  3. (Optional) To add the IP address of the computer you are using, click Add Current. The list below the IP Address field shows the IP addresses that you added.

To remove a debugging IP address:
  1. Select an IP address from the list.

  2. Click Remove Selected. The address no longer appears in the list.

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.

Use the Logging Settings page to enable or disable administrative logging options, as the following table describes:

Option

Description

Log directory

Select this option to change the location where ColdFusion log files are written.

The location that you specify in this field must have sufficient disk space and security privileges for the ColdFusion system service.

Maximum file size (KB)

Set the maximum file size for log files. When a file reaches this size, ColdFusion automatically archives it.

Maximum number of archives

Set the maximum number of log archives to create. After reaching this limit, ColdFusion deletes files in order of oldest to newest.

(UNIX only) Use operating system logging facilities

Select this option to log messages using the UNIX syslog logging facility. ColdFusion also writes log messages to the standard ColdFusion log files.

Log slow pages taking longer than [n] seconds

Specify the number of seconds that ColdFusion waits before logging the names of pages that take longer than the specified interval to process. Logging slow pages can help you diagnose potential problems in your ColdFusion applications. ColdFusion writes entries to server.log.

Log all CORBA calls

Select this option to log all CORBA calls.

Enable logging for scheduled tasks

Select this option to log ColdFusion Executive task scheduling.

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.

Enable/Disable logging

Use the icon for start/stop in the Actions column of the Log Files page to stop/start logging for a particular log type.

Filter log content

  1. To open the Log Filter, click Launch Filter on the Log Viewer page.

  2. In the Log Filter dialog box, specify one or more of the following options:

    Option

    Description

    Show Serverity

    Select one or more severity levels to filter.

    Keywords

    Enter one or more words in the Keywords text box. Click the Find drop-down list box, and select one of these options: exact phrase, any words, or all words.

    Applications

    If applicable, enter the application name to filter. If applicable, the application name appears as the fifth (entry) column in the log file.

    Thread IDs

    The thread identification numbers are used by Adobe Technical Support personnel to track and troubleshoot problems. The thread identification string appears as the fourth entry (column) in a log file.

    Most Recent

    Specifies the relative age of included messages.

    Date Range

    To display the log content for a specific date range, enter the start and end dates. Enter the dates in year-month-day format ( YYYY-MM-DD). For example, to specify April 21, 2002, enter: 2002-04-21.

    Time Span

    To show the log content for a specific time range, enter the start and end times. Enter the time span in hour-minute-second format ( HH:MM: SS). For example, to specify 2:00 P.M., enter 14:00:00.

  3. To begin the filter process, click one of the following options:

    • Show Matches Displays results that match the filter criteria specified on the tab.

    • Hide Matches Displays results that exclude any information that matches the filter criteria specified on the tab.

Log files introduced in ColdFusion 9.0.1

You can generate log files for the following services in ColdFusion 9.0.1:

  • http

  • ftp

  • web service

  • Portlet

  • Derby

  • Feed

System Probes

Note: System probes are available in ColdFusion Enterprise Edition only.

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 page

Use the System Probes page to manage the ColdFusion system probes that were created to monitor the availability of a resource in your website.

Item

Description

Define New Probe

Click this button to create a probe configuration.

Actions

Click these buttons to run, edit, delete, or disable an existing probe configuration.

Probe Name

Shows the names of the ColdFusion probes created.

Status

Shows the current operating state of one or more configured probes per URL, as follows:

  • OK, if the probe is active

  • Failed, if a probe is unable to access the URL specified.

  • Disabled, if the probe is disabled.

  • Unknown

, if the probe is inactive and has not run since the last server restart.

Interval

Shows the period between probes.

URL

Identifies the URL path that each probe is monitoring.

Notification

Notification Email Recipients Specify the e-mail address of the recipient if a probe fails to connect to the specified URL.

Email

Specify the e-mail address of sender. By default, this address is the address specified on the Mail Server page.

Probe.cfm URL

Specifies the probe.cfm page that is located in the CFIDE directory. ColdFusion requires this page to successfully execute probe configurations.

Probe.cfm Username

If the CFIDE directory is secured, the user name for that directory is required.

Probe.cfm Password

If the CFIDE directory is secured, the password for that directory is required.

Suspend probe operation

In the System Probes table, select the name of the probe to suspend, and click the Disable Probe icon.

Add/Edit System Probe page

  1. In the ColdFusion Administrator navigation pane, click System Probes. The System Probes page appears.

  2. In the System Probes page, do one of the following:

    • Define a new probe. Click Define New Probe. The Add/Edit System Probe page appears.

    • Edit an existing probe configuration. Locate and click the probe name. The Add/Edit System Probe page appears.

  3. In the Add/Edit System Probe page, specify or edit the following settings:

    Option

    Description

    Probe Name

    Provide a name for the probe configuration.

    Frequency

    Select the schedule for running this probe:
    • How often (hours, minutes, seconds) the probe verifies the availability of the URL resource.

    • The duration (start and end times) the probe runs to verify the URL resource.

    URL

    Identifies the URL path that each probe is monitoring.

    User Name

    Name If the URL is a secured path, specify the user name.

    Password

    If the URL is a secured path, specify the password.

    Timeout (sec)

    Specify the time, in seconds, to indicate how long the probe should wait before registering a failure.

    Proxy Server

    If this request must be routed through a proxy server, enter the URL and port number of that proxy server.

    Port

    Port number of the proxy server.

    Probe Failure

    Select this option to identify the arguments used to test the URL resource.

    Failure Actions

    Specify one or both of the following actions to occur when detecting a failure:

    • Send an e-mail notification Select to instruct ColdFusion to send an e-mail message when detecting a failure. ColdFusion uses the e-mail address specified onthe System Probe page.

    • Execute the program To run a program when the probe fails, specify the path and name of the program.

    Publish

    Select to write output results to a file.

    File

    If the publish option is selected, specify the output filename.

    Reolve URL

    Select to maintain links to internal URLs remain intact.

  4. Click Submit to save and update the probe configurations listed on the System Probes page.

Code Analyzer page

The Code Analyzer page evaluates your ColdFusion pages for potential incompatibilities between ColdFusion 11 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.

Use the analyzer as follows:
  1. In the left navigation pane, select Debugging & Logging > Code Analyzer.

  2. Enter or browse to a directory that contains the ColdFusion pages to analyze.

  3. (Optional) Click Advanced Options to specify the following items:

    • Whether to analyze subdirectories.

    • The file types to analyze (separate multiple files with semicolons).

    • Whether to filter by severity. All reports error and info data, Error reports code that will not execute properly, and Info reports that you should consider editing, but will execute properly; for example, deprecated tags.

    • Whether to validate CFML. Reports invalid syntax in your CFML; for example, a comment that has an opening ColdFusion comment tag, and a closing HTML tag.

    • The product features to analyze.

  4. Click Run Analyzer to display a report of the results.

Note: When you run the Code Analyzer using the Basic Options, the default settings are as follows: Analyze subdirectories, Analyze file types of *.cfm, Filter by severity: errors, Validate CFML.

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.