![]() ![]() \Magento\Framework\App\ObjectManager::getInstance() >get('Psr\Log\LoggerInterface')->debug('Your Message') To print string Output in debug.log \Magento\Framework\App\ObjectManager::getInstance() ![]() Or you directly use this code in phtml file: $this->_logger->addDebug('Your Text Or Variables') You need to inject \Psr\Log\LoggerInterface class into constructor to call logger object protected $_logger $logger->info('Array Log'.print_r($myArrayVar, true)) // Array Log $logger->info('Simple Text Log') // Simple Text Log Temporary print log with new file $writer = new \Zend\Log\Writer\Stream(BP. Read about QUICK WAY to print Log in any PHP file ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |