Skip to content

Instantly share code, notes, and snippets.

@aleron75

aleron75/log.php Secret

Last active Jan 30, 2021
Embed
What would you like to do?
Quick & dirty logging in Magento 2
<?php declare(strict_types=1);
// ...
// FIXME remove this asap; each time we use the OM, a fairy dies
\Magento\Framework\App\ObjectManager::getInstance()
->get(\Psr\Log\LoggerInterface::class)
->debug(
'This is a temporary log message',
['some debug key' => 'some debug value']
);
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment