ColdFusion Server provides extensive capabilities for generating, managing, and viewing log files, as described in Advanced ColdFusion Administration.
ColdFusion automatically logs errors to the default logs in the following cases:
Otherwise you must use the cflog tag in your error handling code to generate log entries.
The cflog tag lets you specify the following information:
For example, you could use a cflog tag in an exception error page to log the error information to an application-specific log file.
<html>
<head>
<title>Products - Error</title>
</head>
<body>
<h2>Sorry</h2>
<p>An error occurred when you requested this page.
The error has been logged and we will work to correct the problem.
We apologize for the inconvenience. </p>
<cflog file="myapp_errors"
text="Exception error --
Exception type: #error.type#
Template: #error.template#,
Remote Address: #error.remoteAddress#,
HTTP Rerference: #error.HTTPReferer#
Diagnositcs: #error.diagnostics#"
type="Error">
</body>
</html>
The following table describes the highlighted code and its function:
Return to Firstserv.com | ColdFusion Hosting | Macromedia LiveDocs