How to use Mage::log method in Magento 2
There is a replacement of Mage::log method in Magento 2:
1 |
$protected $logger; public function __construct(\Psr\Log\LoggerInterface $logger) { $this->logger = $logger; } $this->logger->info($message); |
Use debug,exception,system for psr logger:
1 |
$this->logger->debug($message); |
Source (