I would like to add code to my Application.cfc onRequestEnd function, which, if the flag of a specific application variable is enabled, will write the SQL query and runtime to the database table. This part is relatively simple since ColdFusion returns sql and runtime as part of the query structure.
However, this site is probably close to 1000 pages, and changing them is simply unrealistic. Therefore, I would like to do this completely programmatically in the onRequestEnd function. To do this, I need to somehow get a list of all the requests that were executed on the page, and that I was at a dead end.
How can I get a list of the names of all requests that were executed on the current page? These queries appear in the template variable area, but there are also many other variables there, and I'm not sure how easy it is to skip this and determine what the query is.
Any help would be appreciated.
source
share