I installed my loggers in my Bootstrap.php as follows:
$logger = new Zend_Log();
if($environment->debug == '1')
{
$stream = @fopen('/var/www/html/rta/rta.log','a',false);
if(!$stream){ throw new Exception('Failed to open log stream'); }
$writer = new Zend_Log_Writer_Stream($stream);
$logger->addWriter($writer);
$logger->addWriter(new Zend_Log_Writer_Firebug());
}
else
{
}
Zend_Registry::set('logger',$logger);
I have the following code that I configured for failure:
$data = array(
'config_id' => $config->getConfigId(),
'pass_column' => $config->getPassColumn(),
'filename' => $config->getFilename(),
'date_format' => $config->getDateFormat(),
'mapping_config' => $config->getMappingConfig(),
'config_name' => $config->getConfigName(),
'client_id' => $config->getClientId(),
'description' => $config->getDescription(),
);
$where = $this->getDbTable()->getAdapter()->quoteInto('config_id = ?',$config->getConfigId());
$where = null;
try
{
$this->getDbTable()->update($data,$where);
}catch(Exception $e)
{
Zend_Registry::get('logger')->err('Could not update configuration.');
Zend_Registry::get('logger')->err($e);
return false;
}
return true;
I installed two logs: Stream and FirePHP. The thread journalist successfully caught and wrote an exception, but FirePHP did nothing. If I add other log messages to another place in my code, for example indexAction, they show that they are both good in both. Did I miss something?
EDIT
The error code is in my mapper kernel, not in the controller. Maybe he does not have access to HTTP headers?
source
share