How can i create zend log.I need to create on manual file in application folder and write response data in that file with full description.
1 Answer
From the documentation of each framework:
In ZendFramework 1.12 you can do the following:
$writer = new Zend_Log_Writer_Stream('/path/to/logfile');
$logger = new Zend_Log($writer);
$logger->info('Informational message');
In ZendFramework 2 you can do the following:
$logger = new \Zend\Log\Logger();
//log to file
$writer = new \Zend\Log\Writer\Stream(getcwd() . '/path/to/logfile');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info('Information message');