Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

mage log magento 2

<?php /* for Magento 2.4 */
  $writer = new end_Log_Writer_Stream(BP . '/var/log/custom.log');
  $logger = new end_Log();
  $logger->addWriter($writer);
  $logger->info('Text Log'); //Text Log
  $logger->info('Array Log'.print_r($myArrayVar, true)); // Array Log
?>
<?php
  $writer = new endLogWriterStream(BP . '/var/log/logfile.log');
  $logger = new endLogLogger();
  $logger->addWriter($writer);
  $logger->info('Simple Text Log'); // Simple Text Log
  $logger->info('Array Log'.print_r($myArrayVar, true)); // Array Log
?>
  
 
PREVIOUS NEXT
Tagged: #mage #log #magento
ADD COMMENT
Topic
Name
4+9 =