tracker issue : CF-3498448

select a category, or use search below
(searches all categories and all time range)
Title:

Log entries have CRLF stripped

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 02/11/2013

Components: Language, Tags, Logging

Versions: 2016,11.0

Failure Type: Data Corruption

Found In Build/Fixed In Build: 9.0.1 / 2018,0,0,308494

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win XP All

Vote Count: 5

Problem Description:
One cannot embed CRLF characters in a log entry to provide it with "formatting".

Steps to Reproduce:
<cflog file="foo" text="Hello#chr(13)##chr(10)#World">

Actual Result:
Hello[space][space]World

Expected Result:
Hello
World

Any Workarounds:
Use Railo. It does it properly.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3498448

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

I'll use that feature everyday.
Vote by External U.
16368 | March 13, 2013 03:09:29 PM GMT
Bug Verified (Comment added from ex-user id:vnigam)
Comment by Adobe D.
16357 | January 06, 2014 03:36:35 AM GMT
This is how loggers are designed. CRLF is stripped from messages so that the log parsers can work without any issues.
Comment by Rupesh K.
16358 | February 11, 2014 01:29:39 AM GMT
+1 - CF doesn't strip CRLF from its own messages, so writelog/cflog should support the same.
Vote by External U.
16369 | May 06, 2015 07:41:38 PM GMT
Hi Rupesh, Why doesn't CF strip CRLF from its own messages (ex: stack trace messages in exception.log), if that's how loggers are designed? Since CF only logs unhandled exceptions, I tried matching CF's formatting for handled exceptions but writelog/cflog mangles the formatting of stack traces since it strips the CRLF. Thanks!, -Aaron
Comment by External U.
16359 | May 06, 2015 07:45:37 PM GMT
Missed Rupesh's original comment on this. Stop talking nonsense, Rupesh. It should be up to ME (the coder) what's logged, and it's MY job to determine whether that's a consideration or not. writeLog() / <cflog>'s job is to do what it's told, not what you second guess might be "better". Equally, as Aaron points out you don't apply this rule to your own log entries, so you're clearly just talking bullsh!t and finding excuses not to do work. Again/still.
Comment by External U.
16360 | May 07, 2015 12:42:48 AM GMT
This issue was not dealt with in a professional or thorough manner, and is still and issue in CF11 so should be reopened and dealt with properly.
Comment by External U.
16361 | September 29, 2015 11:08:45 AM GMT
Adobe, You allow CRLF in *your* log messages, but you don't allow CRLF in our log messages. That's frustrating and is not right! Please re-consider and be fair here. I want to be able to format log messages identically to how CF formats its own log messages. But currently it is not possible, b/c your log messages aren't playing by the same rules. Thanks!, -Aaron
Comment by External U.
16362 | September 29, 2015 02:49:03 PM GMT
Yup. Let's re-flag this ticket as an issue in CF11, and reopen for re-evaluation. Bottom line: you're removing the possibility of functionality here. If someone has a log reader which can't cope with embedded CR/LFs, the they can not put them in in the first place, or remove them as they parse the file. For everyone else, *they* can decide what to do for themselves. Your second-guessing here is - on the face of it - inappropriate.
Comment by External U.
16363 | September 29, 2015 03:58:04 PM GMT
We will leave it as closed. If there is a lot of requests for this, we would consider it for the next release
Comment by Rupesh K.
16364 | December 10, 2015 11:23:42 PM GMT
Also trying to handle errors for the end user but get exception.log style feedback for us.
Vote by Stephen B.
16370 | August 14, 2017 03:08:36 PM GMT
Hi Adobe, This ticket received another vote. Can it please be re-evaluated for Aether? Especially if the log message is being written to a non-CF log file (i.e. not server.log, application.log, etc), CF should just leave our log message alone (i.e. not strip our CRLF out). Thanks!, -Aaron
Comment by Aaron N.
16365 | August 14, 2017 06:42:45 PM GMT
Opening it up for evaluation.
Comment by Vamseekrishna N.
16366 | August 16, 2017 01:28:49 PM GMT
Nice one, Vamsee. Cheers.
Comment by Adam C.
16367 | August 16, 2017 01:34:31 PM GMT
+1
Vote by Royce R.
29139 | June 28, 2018 12:00:14 AM GMT