- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2020
12:32 AM
03-15-2020
12:32 AM
Hello everyone,
I am new to magento 2, so please help me.
I wanted to generate log in a site by using object manager.
Thanks in advance.
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2020
12:35 AM
03-15-2020
12:35 AM
Hello @jenny09yop1298 ,
Please check the below code:
\Magento\Framework\App\ObjectManager::getInstance() ->get(\Psr\Log\LoggerInterface::class)->debug('your message');
I hope this will help you. If it helps you please accept it as solution and give kudos.
Regards.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2020
12:35 AM
03-15-2020
12:35 AM
Hello @jenny09yop1298 ,
Please check the below code:
\Magento\Framework\App\ObjectManager::getInstance() ->get(\Psr\Log\LoggerInterface::class)->debug('your message');
I hope this will help you. If it helps you please accept it as solution and give kudos.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2020
12:42 AM
03-15-2020
12:42 AM
Re: Generate log with object manager for debugging
Thank you @vishi_gulati
You saved my time.