Magento 2 old versions like magento 2.4.0 are accepted like taht
I found a solution to fixed custom log t Magento 2.4.3+++++:
$writer = new Zend_Log_Writer_Stream(BP . '/var/log/mycustom.log');
$logger = new Zend_Log();
$logger->addWriter($writer);
$logger->info("Its working successfully...");
I hove it will help for you!
2
Answers
This will work with magento 2.4.5
in root project.
in composer.json file
verify this:
"require": {
"zendframework/zend-log": "^2.13"
}
if not write this: composer require laminas/laminas-log
https://docs.laminas.dev/laminas-log/installation/