In Magento 2, you can use the following code to write logs to the custom files
$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/templog.log'); $logger = new \Zend\Log\Logger(); $logger->addWriter($writer); $logger->info("Log info: ". $e->getMessage());
- December 16, 2019 @ 18:49:47 [Current Revision] by Sharing Solution
- December 16, 2019 @ 18:49:46 by Sharing Solution
No comments yet.