Warning about ColdFusion 10 and ORM Logging
Join the DZone community and get the full member experience.
Join For FreeFirst 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:
log4j.appender.HIBERNATECONSOLE.MaxFileSize=500KB log4j.appender.HIBERNATECONSOLE.MaxBackupIndex=3
These two settings 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.
Published at DZone with permission of Raymond Camden, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Decoding ChatGPT: The Concerns We All Should Be Aware Of
-
Extending Java APIs: Add Missing Features Without the Hassle
-
Knowing and Valuing Apache Kafka’s ISR (In-Sync Replicas)
-
Observability Architecture: Financial Payments Introduction
Comments