Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Warning about ColdFusion 10 and ORM Logging

DZone's Guide to

Warning about ColdFusion 10 and ORM Logging

· Java Zone
Free Resource

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

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:

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.

Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

Topics:

Published at DZone with permission of Raymond Camden, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}