I tried this:

$logger = new Zend\Log\Logger;
$writer = new Zend\Log\Writer\Stream('php://output');
$logger->addWriter($writer);
Zend\Log\Logger::registerErrorHandler($logger);

Then added below, but I did not get any notice message because of undefined
array element. as it seems errorHandler is registered.

if($blah[aa]) {
    print("a");
}

why I am not getting any notice log for this? (E_NOTICE is off in my php.ini
but I expected set_error_handler turns it on) I tried adding in start
error_reporting(-1) and I see both zend/log notce and also normal php
notice, so how can I use the error handler of zend/log without using
error_reporting(-1), because if I use it, I see the normal php errors too as
well as the one by zend/log?

I did this trick:
error_reporting(E_ALL);
ini_set('display_errors', '0');

But I am not sure if this is really necessary when using zend/log
errorhandler?
Am I in correct way adding these two lines to solve the issue? I am still
wondering why zend/login set_error_handler did not turn on E_NOTICE?




--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/zend-log-error-handler-tp4661940.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to