mage log magento 2
<?php
$writer = new ZendLogWriterStream(BP . '/var/log/logfile.log');
$logger = new ZendLogLogger();
$logger->addWriter($writer);
$logger->info('Simple Text Log'); // Simple Text Log
$logger->info('Array Log'.print_r($myArrayVar, true)); // Array Log
?>