June 4, 2016 8:38 am
image_round

Magento 2 : How to add custom logs

$_product = $this->item->getProduct();
$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info(print_r($_product->getData(), true));

Magento 2 : How to add custom logs

$_product = $this->item->getProduct();
$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info(print_r($_product->getData(), true));