CC-4275: Enable debug mode where all Propel queries are displayed in raw SQL

-add enablePropelLogging and disablePropelLogging functions
This commit is contained in:
Martin Konecny 2012-08-23 22:27:24 -04:00
parent 7cbe037c7e
commit 9893282e43
3 changed files with 84 additions and 70 deletions

View file

@ -14,18 +14,6 @@ require_once __DIR__."/configs/ACL.php";
require_once 'propel/runtime/lib/Propel.php';
Propel::init(__DIR__."/configs/airtime-conf-production.php");
if (defined('APPLICATION_ENV') && APPLICATION_ENV == "development") {
$logger = Logging::getLogger();
Propel::setLogger($logger);
$con = Propel::getConnection();
$con->useDebug(true);
$config = Propel::getConfiguration(PropelConfiguration::TYPE_OBJECT);
$config->setParameter('debugpdo.logging.details.method.enabled', true);
$config->setParameter('debugpdo.logging.details.time.enabled', true);
$config->setParameter('debugpdo.logging.details.mem.enabled', true);
}
require_once __DIR__."/configs/constants.php";
require_once 'Preference.php';