Created
December 3, 2018 22:51
-
-
Save davidvthecoder/5bdd6bfacce20de6134ae6301a754c9d to your computer and use it in GitHub Desktop.
simple inline logger for magento 2 to do simple testing on things that cant dump to page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/logfile.log'); | |
$logger = new \Zend\Log\Logger(); | |
$logger->addWriter($writer); | |
$logger->info('message/var to log'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or try this for 2.3.4
$writer = new \Zend_Log_Writer_Stream(BP . '/var/log/vsp.log'); $logger = new \Zend_Log(); $logger->addWriter($writer); $logger->info('text message');