You don't appear to be using the addRecord function of your logger, so that means that the debug adminpanel option has no effect. This could be rewritten if this is desired behaviour.
If no rewrite is desired, a quick fix is simply to pass the handler to the created instance of Monolog:
class Logger
{
private const LoggerName = 'ConektaPaymentsLogger';
/**
* @var MonoLogger
*/
private $monolog;
public function __construct($name, $handlers)
{
$this->monolog = new MonoLogger(self::LoggerName, $handlers);
}
This will also be enough to get the logger to work again.
Hi,
In the current release the logger is not working. It appears that you are not injecting the handler correctly. Affected code:
https://github.com/conekta/customer-magento-plugin/blob/d97be82aebec85136c3448a1cb84a4eae9f4f29e/Logger/Logger.php#L9-L20
I believe a more simple and standard way is to set up a logger is:
Where all implementation is handled by Monolog. Your di is already set up correctly for this to work: https://github.com/conekta/customer-magento-plugin/blob/d97be82aebec85136c3448a1cb84a4eae9f4f29e/etc/di.xml#L18-L30
You don't appear to be using the
addRecord
function of your logger, so that means that the debug adminpanel option has no effect. This could be rewritten if this is desired behaviour.If no rewrite is desired, a quick fix is simply to pass the handler to the created instance of Monolog:
This will also be enough to get the logger to work again.
Thank you.