我正在学习使用 <cfscript>
。
在 <cfscript>
中有没有一种方法可以记录一些消息或值?
就像在 <cfscript>
外面我可以使用 <cflog>
一样,有没有任何方法或标签可以用来将消息打印到日志文件中?
谢谢
我正在学习使用 <cfscript>
。
在 <cfscript>
中有没有一种方法可以记录一些消息或值?
就像在 <cfscript>
外面我可以使用 <cflog>
一样,有没有任何方法或标签可以用来将消息打印到日志文件中?
谢谢
ColdFusion 9 新增了 "writeLog" 函数,可以实现这一功能。链接
<cfscript>
log text="some text" file="logfilename" type="information";
</cfscript>
<cflog text="some text" file="logfilename" type="information">
<cffunction name="doCFLog">
<cflog attributeCollection="#arguments#">
</cffunction>