Alex Rivera | Logout

How to log information from inside <CFScript>

Asked 2010-02-10T11:08:18.740
16

I am learning to use <cfscript>.

Is there any way I can log some messages or values inside the <cfscript>?

like outside <cfscript> I can use <cflog>, Is there any way or Tag something like that, i can use to print the messages in log file inside >

Thanks

Edit
Report

1 Answer

5

In Lucee/Railo you can use cflog in script by removing the angular brackets and the "cf" prefix, so you can write

<cfscript>
  log text="some text" file="logfilename" type="information";
</cfscript>

this is equivalent to

<cflog text="some text" file="logfilename" type="information">
answered 2013-04-03T20:54:04.557

Your Answer