Error with Empty String as Text Parameter of writeLog/<cflog>

Description

Either of those will throw an error of:

`you must define attribute text or attribute exception with the tag cflog`

I would expect a blank log line, instead; empty string should be valid, especially because the value can be dynamic, and if it is, it might be empty.

Also, it's not a big deal, but it's a bit weird that the error mentions "cflog", even for the writelog example. Maybe that's just a general quirk of the cfscript/tag implementation.

Environment

None

Activity

Pothys - MitrahSoft 
28 January 2025 at 06:27

I have tested this ticket with Lucee version 6.2.0.304-SNAPSHOT. Now, the writelog with an empty string successfully logs. It works fine compared to ACF.

Zac Spitzer 
23 January 2025 at 16:34

Pothys - MitrahSoft 
18 August 2022 at 07:46

I've added a fix and testcase to this ticket
Pull Request:

Pothys - MitrahSoft 
17 August 2022 at 10:48

Seems ACF entries the empty log text to the log file

the log entries from ACF application.log

Zac Spitzer 
28 March 2022 at 10:15

I strongly believe logging shouldn’t crash a request, let’s just write out a empty string

https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/tag/Log.java#L245

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 18 February 2015 at 20:19
Updated 28 January 2025 at 06:27
Resolved 28 January 2025 at 06:27