문제

After installing Magento 2.3, When I am trying to open the admin panel login screen is blank and my console contains an error as shown in the image. if anyone has a solution then please let me know.

magento 2 how to print log???

도움이 되었습니까?

해결책

$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info('Your text message');

You can also print PHP objects and arrays like below :

$logger->info(print_r($yourArray, true));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top