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?”
Verify Filename has extension .tar or not using PHP Magento 2.
If the file is a valid tar file, the result will be true otherwise result will be false. Some time you need to verify the current file is tar or not in that scenario, this article is used for your development. Continue reading “How to check File is .tar using Magento 2?”
Check Given file is an archive or not using Magento 2 by Magento\Framework\Archive Class.
Archive class has a logic to verify the given file is an archive or not in Magento 2. Continue reading “How to verify File is Archive or not using Magento 2.”