Print Log In Magento 2

0
55
views
Print Log In Magento 2
Advertisement

To print log you just need to use any of this below method in your block, helper or model class file.

$this->_logger->emergency('emergency method called');
$this->_logger->alert('alert method called');
$this->_logger->critical('critical method called');
$this->_logger->info('Info method called');
$this->_logger->error('error method called');
$this->_logger->warning('warning method called');
$this->_logger->notice('notice method called'); 
$this->_logger->debug('debug method called');

Thanks for reading my blog. I hope it will help you, Please leave your comments here if it’s really help you.☺

Thank You☺,
Mayank Zalavadia