When you are developing a website, you may find the need to log the variables or the custom messages created for the website. While Magento 2 has a built-in log facility based on Monolog library, there will come a time when you need to create a custom logging.You can find this package in the following location: MAGENTO2_ROOT/vendor/monolog.

The main Magento 2 log facility class is Magento\Framework\Logger\Monolog, and this is defined in MAGENTO2_ROOT/app/etc/di.xml as:
<preference for="Psr\Log\LoggerInterface" type="Magento\Framework\Logger\Monolog" />
Read full article : http://www.magesolution.com/blog/cus...ing-magento-2/

View more threads in the same category: