1

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???

1

2 Answers 2

0
$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));
0
0

Try use this plugin for download logs from admin panel - https://github.com/metasyncSite/Magento-2-log-viewer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.