doctrine query error reporting -


i wondering if possible output doctrine error, equivalent like:

die(mysql_error());

i asking because of form script not saving data, not returning error either. , have no idea doctrine doing 'behind scenes'.

much appreciated j

class filesqllogger implements doctrine\dbal\logging\sqllogger {      private $log_dir = '/var/www/logs/doctrine/queries';      public function startquery($sql, array $params = null, array $types = null)     {         $now = new datetime;         $file_name = "{$this->log_dir}/{$now->format('d-m-y')}.log";          if (is_writable($this->log_dir))         {             file_put_contents($file_name, "{$now->format('h:i:s')}: executing query '{$sql}' parameters " . implode(', ', $params));         }         else         {             die('error: unable write doctrine log file!');         }     }  } 

i haven’t tested , have no idea if work, think should in right direction.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -