Magento 2 Zend Log

$writer = new \Zend_Log_Writer_Stream(BP . '/var/log/testlog.log');
$logger = new \Zend_Log();
$logger->addWriter($writer);
$logger->info('testt'); // Print string type data
$logger->info('Data::' . print_r($arrData, true)); // Print array type data

In magento 2 you can debug any code via above logger script.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply