As we all know that after the release of the Magento 2.4.3 version, the Laminas-log module is removed. Thus, the previous method by using the following will not work
quick ways to debug
$writer = new \Laminas\Log\Writer\Stream(BP . '/var/log/custom.log');
$logger = new \Laminas\Log\Logger();
$logger->addWriter($writer);
So after 2.4.3+
try {
$writer = new \Zend_Log_Writer_Stream(BP . '/var/log/custom.log');
} catch (\Zend_Log_Exception $e) {
// throw exception
}
$logger = new \Zend_Log();
$logger->addWriter($writer);
$logger->info('Debuggging on!');