I created a customized logger that works perfectly. Now I would like that when an exception is raised the logger writes all the text file.
onDispatch method of my controller I have the following code
\Zend\Log\Logger::registerErrorHandler ($this->_logError);
\Zend\Log\Logger::registerExceptionHandler ($this->_logError);
\Zend\Log\Logger::registerFatalErrorShutdownFunction($this->_logError);
nothing is write
if i use
$this->_logError->doLog()
all works fine
i thing thant logger is not attached to error handler
i need to create my log in controller beacuse i can set different file name.