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!