The "current" wiki says to use
CRM_Core_Error::debug and says, "Most runtime errors are logged here, as well as data that you explicitly write to log using the CRM_Core_Error::debug log=true parameter." However, if you set
$log = true, that just does an echo.
An older version of the docs says to use
debug_var - and this works correctly, but seems duplicative, and isn't mentioned in the current docs.
Should the documentation be changed? Or should the code be refactored?