<?php
namespace Sailthru\MageSail;
use Magento\Store\Model\StoreManager;
use Zend\Log\Logger as ZendLogger;
use Zend\Log\Writer\Stream;
class Logger extends ZendLogger
You should be able to change it to use MonoLogger. I did take a very quick attempt try at this, but ran into some errors -
Type Error occurred when creating object: Sailthru\MageSail\Logger, Too few arguments to function Monolog\Logger::__construct(), 0 passed in /app/vendor/sailthru/sailthru-magento2-extension/Logger.php on line 18 and at least 1 expected
MonoLogger can be found at vendor/monolog/monolog/src/Monolog/Logger.php
For now, I've been able to just get rid of the construct method to allow the upgrade to work, so essentially getting rid of logging for the extension. If I circle back to this before after testing other parts of the upgrade I may attempt to rewrite it again, depending on time.
From trying to upgrade from 2.4.1 > 2.4.3 there seems to be an issue with the compilation
php ./bin/magento setup:di:compile --ansi --no-interaction '-vvv'
From checking various logs, it seems to be with the Zend\Log\Logger class -
report.CRITICAL: Class \Zend\Log does not exist
I'm guessing this is a change from the Zend framework being slowly deprecated for laminas project?
File in question is -
vendor/sailthru/sailthru-magento2-extension/Logger.php
You should be able to change it to use MonoLogger. I did take a very quick attempt try at this, but ran into some errors -
Type Error occurred when creating object: Sailthru\MageSail\Logger, Too few arguments to function Monolog\Logger::__construct(), 0 passed in /app/vendor/sailthru/sailthru-magento2-extension/Logger.php on line 18 and at least 1 expected
MonoLogger can be found at
vendor/monolog/monolog/src/Monolog/Logger.php
For now, I've been able to just get rid of the construct method to allow the upgrade to work, so essentially getting rid of logging for the extension. If I circle back to this before after testing other parts of the upgrade I may attempt to rewrite it again, depending on time.