Overview
Deprecated code and features are those that have been retired and replaced by alternative functionality. These features should not be used, and remain in the code base for the sole purpose of providing backward compatibility. You can assume that at some point this code will be removed, so developers should make every effort to refactor code relying on deprecated elements of the framework.
Deprecated Logging
In an effort to make detecting the use of deprecated code easier, we have tried to integrate an option for logging the use of deprecated features. Where possible we log the use of a deprecated feature and suggest an alternative.
You can turn on logging by setting a flag for application.log.bDeprecated in your project's ./config/_serverSpecificVars.cfm
<cfset application.log.bDeprecated = true />
As you use your application a log called deprecated.log will be generated in your servers logging directory. You can reach this through the CFIDE administrator logging area. In addition, a trace will be made at runtime into your debugging output; you will need to activate view CFTRACE in your debugging to see this.
Flagging Code As Deprecated
As a core developer you can flag deprecated code by including this following snippet:
<cfif structkeyExists(application.log, "bDeprecated") AND application.log.bDeprecated> <cflog file="deprecated" application="true" type="warning" text="Your message." /> </cfif>
The log message should specify what deprecated feature is being used and the alternative feature/function that should be used in its stead.