Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 890

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
Logging information
You call the following JavaScript functions to send information to the logger. In most cases, the function corresponds
to a severity level, as follows:
Function
ColdFusion.Log.debug
ColdFusion.Log.dump
ColdFusion.Log.error
ColdFusion.Log.info
You cannot generate a window-level message. This level is reserved for messages generated by the log reader window,
including information about JavaScript errors in the log function calls.
When you call a logging function, you specify a message and a category.
• The message can include JavaScript variables and HTML markup, such as bold text and line breaks.
• The category is a short descriptive name. ColdFusion generates a check box option for each category to filter the
logging window output. This parameter is optional; the default value is
ColdFusion category or a custom category.
To log information for a page, you must have a ColdFusion Ajax tag on the page, or use the
tag does not require any attributes to enable logging.
cfajaximport
The following logging function generates an error level, Pod A category log message:
ColdFusion.Log.error("<b>Invalid value:</b><br>" + arg.A, "Pod A");
Standard ColdFusion logging messages
ColdFusion automatically logs messages in the following categories:
Category
Description
global
(the default) Messages that are not logged from within the ColdFusion Ajax libraries, for example, initialization
of the logging infrastructure.
http
Information about HTTP calls and their responses, including the contents of HTTP requests and information on
CFC invocations and responses.
LogReader
Messages about the log display window.
bind
Bind-related actions such as evaluating a bind expression.
widget
Control-specific actions such as tree and grid creation.
Ajax programming rules and techniques
The following techniques help you to prevent Ajax application errors, improve application security, and develop more
effective applications.
Severity
Purpose
debug
A message that aids in debugging problems.
debug
A representation of a single variable in a format similar to
function displays the structure and contents of JavaScript Array and Object
variables.
error
Information about an error. Use this function only in error-handling code.
info
Information about properly operating code that is useful in tracing and
analyzing the client-side code's execution.
Last updated 1/20/2012
cfdump
. You can specify a standard
global
cfajaximport
885
. This
tag. The

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents