cflog script equivelent

74 views
Skip to first unread message

Nando Breiter

unread,
Jan 27, 2016, 11:49:43 AM1/27/16
to lu...@googlegroups.com
What is the <cflog> script equivalent in Lucee?

log() calculates the natural logarithm of a number, so that's not it.

WriteLog() only works in ACF, at least it doesn't appear in the Lucee docs. WriteLog() also does not appear in the list of unsupported functions:

http://docs.lucee.org/reference/unsupported.html

Do folks use FileWriteLine() for this purpose? 

Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamedia

Igal @ Lucee.org

unread,
Jan 27, 2016, 11:51:40 AM1/27/16
to lu...@googlegroups.com
Do folks use FileWriteLine() for this purpose? 
no.

did you try:

    log file="logfile" text="message";


Igal Sapir

Lucee Core Developer
Lucee.org

--
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAGHrs%3D9v%3DzFzegiQKfW_bZ%2Bmi_%3DN7-CskQED5zSbAjdrkgHPMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Nando Breiter

unread,
Jan 27, 2016, 2:13:45 PM1/27/16
to lu...@googlegroups.com
Hi Igal, thanks! 

Is that syntax style implemented for all tags in Lucee, or just some of them?

Kind regards,

Nando




Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamedia

Igal @ Lucee.org

unread,
Jan 27, 2016, 2:19:16 PM1/27/16
to lu...@googlegroups.com
almost all (exception in dump() and a few others).

the idea is simple:

you remove the angle-brackets, remove the "cf" prefix, and terminate with a semi-colon.  if the tag has a body then you use echo() to write the body, so:

<cfabort message="some error">

    becomes

abort message="some error";

and

<cfquery name="qTime">

  SELECT now();
</cfquery>


    becomes

query name="qTime" {

    echo("SELECT now();");
}


Igal Sapir
Lucee Core Developer
Lucee.org

ADK

unread,
Jan 27, 2016, 8:56:20 PM1/27/16
to Lucee
Though not in the docs, writeLog does appear to work in Lucee 4.x

AJ Mercer

unread,
Jan 27, 2016, 9:07:44 PM1/27/16
to lu...@googlegroups.com
This works in Lucee / Railo
writeLog(file='application',text='running SERVICE user.register() #serializejson(arguments)#');

--
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages