![]() |
|
|
|
Debug To File
Project Home • Forums • Known Issues • Contact Project
Author: Bilal (All RIAForge projects by this author) Description: This is an alternate template for Debug output based on the Classic ColdFusion Debug output. It will allow unattended capture of debug information to file system as requests are being made. It has the same overhead characteristics as leaving Debug on, so it should be used temporarily. Thus, please do not keep this debug option enabled as it may cause your drive to fill up. To use this, please copy this file to your ColdFusion debug directory normally located here: [cfroot]\wwwroot\WEB-INF\debug Then access your ColdFusion Administrator Debug Settings page and select ToFile.cfm from the drop down menu for Debug Output Format. Files will be written to the ColdFusion temp directory normally located here: [cfroot]\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\U00 The following flags can be provided in either variable, form, or url scope to direct the behavior of this debug processing. You can set the flags in URL or in Request scope. A good place for setting these would be in Application.cfc DebugSilent => if this is defined the final line at the bottom of the output will be supressed, default: False DebugOnlyErrorToFile => only write files when there is an error (even if caught with cftry/cfcatch), default: False DebugErrorToEmail => attempt to send Error debug output to this email address DebugTemplates => CSV list of templates names (only the filename not the path), if you only want to capture debug information only for certain templates, e.g. GetCart.cfm DebugUserRoles => CSV list of roles, if you are using cflogin framework, you can restrict capture to user in given role, e.g. admins DebugUserIDs => if you are using Session.UserIDs a list of IDs for which to capture debug, see below: Using Session.UserID: If you use Session.UserID as a variable in your applications the last directory will carry the user ID, e.g. for user with Session.UserID=34 the subdirectory in which the debug output will be stored would be U34 [cfroot]\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\U34
Last Update:
Added option for Role based logging and only logging of specific templates
Requirements:
This has been tested with CF 7,8,9 and 10.
Please see code comments on how to install and use. Issue Tracker: There are no issues for this project. To enter issues for this (or any other) project, you must be logged in. |
Adobe and the Adobe product names are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.