You can create your custom log file as a module in the var/log folder. You can generate a .log file based on your module name or functionality-related name.
You need to create an etc/di.xml file and specify the virtual type for the logger.
Create a Virtual type for the class Magento\Framework\Logger\Handler\Base to specify your custom file name. Continue reading “How to create custom log file in Magento 2 module?”