Skip to content

Instantly share code, notes, and snippets.

@aleron75

aleron75/log.php Secret

Last active January 30, 2021 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aleron75/f078d7b0c077774c50a3b26000081e49 to your computer and use it in GitHub Desktop.
Save aleron75/f078d7b0c077774c50a3b26000081e49 to your computer and use it in GitHub Desktop.
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