Skip to content
Snippets Groups Projects
Commit 9239a57a authored by Tim Steiner's avatar Tim Steiner
Browse files

Add support for a logger in the index.php bootstrap.

parent 367a4c7b
Branches
Tags
No related merge requests found
...@@ -54,18 +54,14 @@ if ($config->log instanceof Zend_Config) { ...@@ -54,18 +54,14 @@ if ($config->log instanceof Zend_Config) {
$log->addWriter(new Zend_Log_Writer_Stream($config->log->stream)); $log->addWriter(new Zend_Log_Writer_Stream($config->log->stream));
} }
if ($config->log->firebug) { if ($config->log->firebug) {
echo 'yes' . PHP_EOL;
$log->addWriter(new Zend_Log_Writer_Firebug()); $log->addWriter(new Zend_Log_Writer_Firebug());
} }
if ($config->log->syslog instanceof Zend_Config) { if ($config->log->syslog instanceof Zend_Config) {
print_r($config->log->syslog);
$log->addWriter(new Zend_Log_Writer_Syslog($config->log->syslog->toArray())); $log->addWriter(new Zend_Log_Writer_Syslog($config->log->syslog->toArray()));
} }
} }
$log->log('nope', Zend_Log::WARN);
Zend_Registry::set('log', $log); Zend_Registry::set('log', $log);
Zend_Layout::startMvc(); Zend_Layout::startMvc();
$layout = Zend_Layout::getMvcInstance(); $layout = Zend_Layout::getMvcInstance();
$layout->setLayoutPath(MODULES_DIR . '/default/views/scripts'); $layout->setLayoutPath(MODULES_DIR . '/default/views/scripts');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment