> I am curious to see what decisions your guys have made > towards logging errors. Currently, I need to store detailed > information about errors in a database. The scope of my > engagement includes all web browsers. Therefore, I want to > log user web browser (#CGI.HTTP_USER_AGENT#) and also user > ids and other application variables. Initially, I was > thinking of using the quickest way possible by wrapping > cftry/cfcatch around the whole page. I know this cannot be > the best practice solution so I am curious to see what the > board members think.
First, wrapping your entire page with CFTRY is an awful idea. Don't do that. With that out of the way, you could do this sort of logging within the site-wide error handler or within your CFERROR page(s). But this would require you to assume that the database is available, which may not be the case. As an alternative, you could write to an error log with CFLOG, then periodically roll the log and write the events to a database. The log rolling and database logging need not even use CF. In my experience, most people simply log errors to file. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 and Flex 2 Build sales & marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270340 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

