/**
  * Executes a prepared statement.
  *
  * Returns a boolean value indicating success.
  * Overridden for query counting and logging.
  *
  * @param  string  $parameters
  * @return boolean
  */
 public function execute($parameters = null)
 {
     $return = $this->statement->execute($parameters);
     if ($this->connection->useDebug) {
         $sql = $this->getExecutedQueryString();
         $this->connection->log($sql);
         $this->connection->setLastExecutedQuery($sql);
         $this->connection->incrementQueryCount();
     }
     return $return;
 }
 /**
  * {@inheritDoc}
  */
 public function log($msg)
 {
     if ($this->isSlowOnly && !$this->getProfiler()->isSlow()) {
         return;
     }
     $msg = $this->getProfiler()->getProfile() . $msg;
     return parent::log($msg);
 }
 /**
  * Logs the method call or SQL using the Propel::log() method or a registered logger class.
  *
  * @uses      self::getLogPrefix()
  * @see       self::setLogger()
  *
  * @param     string   $msg  Message to log.
  * @param     integer  $level  Log level to use; will use self::setLogLevel() specified level by default.
  * @param     string   $methodName  Name of the method whose execution is being logged.
  * @param     array    $debugSnapshot  Previous return value from self::getDebugSnapshot().
  */
 public function log($msg, $level = null, $methodName = null)
 {
     if ($this->isSlowOnly && !$this->getProfiler()->isSlow()) {
         return;
     }
     $msg = $this->getProfiler()->getProfile() . $msg;
     return parent::log($msg, $level, $methodName);
 }