I didn't do this, but someone I used to work with did. Back in the CF4.5 days, before CF managed the size of its log files itself, you could see a performance hit if the file got overly large. So, we needed something that would rename any log file that got over a certain size and let CF start building a new one. We figured 1 MB was about right.
His solution? Use CFFILE to read the file into a variable. Then check the Len() of the variable and, if it was over 1000000, write the contents of the variable to a new file, then delete the original. It was run by the scheduler, so we didn't initially note how long it took to run. Other people I worked with had a tenuous grasp of basic CF concepts. One of my favorite code snippets was: <cfif Len(form.myVariable) GT 0> <cfset myVariable=form.myVariable> <cfelse> <cfset myVariable=""> </cfif> Of course, my most recent bonehead move was to write a UDF to count the number of times a particular value appeared in a list. What's that you say? There's a function called ListValueCount()? On Apr 1, 2005 10:43 AM, Claremont, Timothy <[EMAIL PROTECTED]> wrote: > This morning all he!! Broke loose when the intranet was spewing errors > left and right. > > Come to find out I was using a poor choice of determining yesterdays > date. I was merely subtracting 1 from the day of the month. Hence, I was > trying to generate a bunch of stuff with a date of April 0, 2005. > Naturally, this mistake did not rear its ugly head until the first of > the month. > > Go ahead... Tell me you have never made such a brilliant mistake! > > -Tim > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please delete it from > your system. > > This footnote also confirms that this email message has been swept for > the presence of computer viruses. > > Thank You, > Viahealth > ********************************************************************** > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201990 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

