Add ability to enable query logging per process
authoreileen <emcnaughton@wikimedia.org>
Thu, 3 Sep 2020 03:40:47 +0000 (15:40 +1200)
committereileen <emcnaughton@wikimedia.org>
Thu, 3 Sep 2020 04:40:44 +0000 (16:40 +1200)
commitfbebca7a718b7abe61c559d04a8354b9fd169b04
treee970d6f660702bd82d187eb3d15d57d7a47d75cd
parentd42a0ae4db8c9acf90fadb85e0faa246eade3ac3
Add ability to enable query logging per process

This allows us to run a command such as

env CIVICRM_DEBUG_LOG_QUERY=1 drush cvapi Contact.get

and the queries for that process (but not others) are logged.

This facilitates a cleaner record of queries as it is just one process and more flexibility
(and less risk of leaving it on by mistake)
CRM/Core/Error.php