Add the below lines of code to the executing function. This will generate a log file in the location specified. Here it is /var/log/test.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');//json_encode() if not text
No comments:
Post a Comment