How can I see inside the $this
object in my logger file using prs logger?
I tried this
\Magento\Framework\App\ObjectManager::getInstance()->get(\Psr\Log\LoggerInterface::class)->info("in getMediaGalleryImages " .json_encode($this));
But this gives me {}
every time.
[2019-05-29 10:07:24] report.INFO: in getMediaGalleryImages {} [] []
What's the right method to see inside the $this object in Magento 2 logger.
$self
instead of$this
$self
can do the trick.json_encode($this)
?