First off, credit for this post belongs to multiple people. This post stems from a discussion on a private listserv of ColdFusion developers. I'll make a list of folks at the end, but in this case, I'm mainly serving as the 'errand boy' to report the issue and help spread the word. I'll do my best to describe the issue accurately but any screw up is entirely my fault.
In ColdFusion 9 (and in the docs for ColdFusion 10 but not actually implemented), the log settings for ORM (as set in cfhome\lib\log4j.properties) is:
log4j.appender.HIBERNATECONSOLE=org.apache.log4j.ConsoleAppender
This means ORM-related messages are logged to the console. But in ColdFusion 10, this switched to:
log4j.appender.HIBERNATECONSOLE= org.apache.log4j.FileAppender
Another issue is that in ColdFusion 9, these two settings...
log4j.appender.HIBERNATECONSOLE.MaxFileSize=500KB log4j.appender.HIBERNATECONSOLE.MaxBackupIndex=3
are commented out. You can probably guess what the result is - a (potentially!) huge ass log file. Most likely you want to change to a rolling file appender as described here: ColdFusion ORM : How to log SQL.
If you use ORM, I'd recommend checking your logs now and updating your settings as well.
Credit: Sam Farmer, Phill Nacelli, and anyone else I forgot.
Archived Comments
> a private listserv of ColdFusion developers
Details? How private?
But I have one question, is there any reason why these settings can not also be set at the application layer as well. For example shared hosting and those who run multiple sites for their clients, could benefit from the ability to just switch on the logging for that application only as well as where to store these log files.
Ya, I got bitten by it few time. Do you know if there is an ER already logged for this for CF 11?
Yeah, we have been bitten as well. On one server it got to > 70gb before we discovered it, and on another we forgot to turn that setting off when we went to production on a legacy server without a lot of disk space and didn't remember until it had filled the disk up with > 100gb in that one file.
I agree as well that the application level setting should control it, or at very least have an admin level setting.
If someone discovers or creates an ER let me know, I would like to vote for it.
@john: Sorry, I can't.
@andrew: I agree. :)
@Sumit: Yes - it should already be corrected in 11.
John, Ray's almost certainly talking about the ColdFusion 11 Pre-Release programme. People on it like to be secretive about their membership of it despite there being no reason to be (it's *not* part of the NDA they... and I... all signed).
What they *can't* repeat is the discussions that go on there. I can only presume Ray got special sanction to raise this here. Otherwise this blog post *would* be breaking the NDA...
--
Adam
https://bugbase.adobe.com/i...
Adam, it really wasn't relevant - that's why I didn't specify the listserv. It wasn't part of me trying to be secretive - it just didn't matter.
Andrew, thanks - voting it up now.
No problem Ray, I am just surprised something like this has not been raised before.
On a side note, while talking about ORM & Logging... Does anyone have any actual stats, to show how much overhead logging can add to the request?
I am trying to gauge how slow is too slow, when it comes to CF-ORM.
Another 'problem'
log4j.appender.HIBERNATECONSOLE.File=/opt/coldfusion10/cfusion/logs/hibernatesql.log
so this means its logging to the default instances log folder. However, if you are running multi instance CF10, then this is logging to the wrong instance folder.
Thanks for posting Ray (my blog has retired). Though I thought the first rule of fight club was...etc, etc.
Adam, Andrew: There is a bug out there for this:
https://bugbase.adobe.com/i...