title: Zend Log - Bad Log Priority
body: <p>When I try to add a registerErrorHandler() to my log config in my bootstrap it gives the following error:</p>
  
  <pre><code>&lt;b&gt;Fatal error&lt;/b&gt;:  Uncaught exception 'Zend_Log_Exception' with message 'Bad log priority' in /public/fb/library/Zend/Log.php:280
  Stack trace:
  #0 /public/fb/application/Bootstrap.php(24):    Zend_Log-&amp;gt;__call('registerErrorHa...', Array)
  #1 /public/fb/application/Bootstrap.php(24): Zend_Log-&amp;gt;registerErrorHandler()
  #2 /public/fb/library/Zend/Application/Bootstrap/BootstrapAbstract.php(666): Bootstrap-&amp;gt;_initLogging()
  #3 /public/fb/library/Zend/Application/Bootstrap/BootstrapAbstract.php(619): Zend_Application_Bootstrap_BootstrapAbstract-&amp;gt;_executeResource('logging')
  #4 /public/fb/library/Zend/Application/Bootstrap/BootstrapAbstract.php(583): Zend_Application_Bootstrap_BootstrapAbstract-&amp;gt;_bootstrap(NULL)
  #5 /public/fb/library/Zend/Application.php(355): Z in       
  
  &lt;b&gt;/public/fb/library/Zend/Log.php&lt;/b&gt; on line    &lt;b&gt;280&lt;/b&gt;
  </code></pre>
  
  <p>Bootstrap.php</p>
  
  <pre><code>protected function _initLogging(){
  
  $log = new Zend_Log();
  $writer = new Zend_Log_Writer_Stream(APPLICATION_PATH .'/../data/logs/app.log');
  $log-&gt;addWriter($writer);
  $log-&gt;registerErrorHandler();
  
  }
  </code></pre>
  
  <p>Output Zend_Debug::dump($log):</p>
  
  <pre><code>object(Zend_Log)#20 (6) {
  ["_priorities":protected] =&gt; array(8) {
  [0] =&gt; string(5) "EMERG"
  [1] =&gt; string(5) "ALERT"
  [2] =&gt; string(4) "CRIT"
  [3] =&gt; string(3) "ERR"
  [4] =&gt; string(4) "WARN"
  [5] =&gt; string(6) "NOTICE"
  [6] =&gt; string(4) "INFO"
  [7] =&gt; string(5) "DEBUG"
  }
  ["_writers":protected] =&gt; array(1) {
  [0] =&gt; object(Zend_Log_Writer_Stream)#21 (3) {
  ["_stream":protected] =&gt; resource(59) of type (stream)
  ["_filters":protected] =&gt; array(0) {
  }
  ["_formatter":protected] =&gt; object(Zend_Log_Formatter_Simple)#22 (1) {
  ["_format":protected] =&gt; string(51) "%timestamp% %priorityName% (%priority%): %message%"   
  }}}
  ["_filters":protected] =&gt; array(0) {
  }
  ["_extras":protected] =&gt; array(0) {
  }
  ["_defaultWriterNamespace":protected] =&gt; string(15) "Zend_Log_Writer"
  ["_defaultFilterNamespace":protected] =&gt; string(15) "Zend_Log_Filter"
  }
  </code></pre>
  
  <p>Thx for helping.</p>