I would like to know the below 2 locations of Magento 1 in Magento 2. Where can I find these 2 locations in Magento 2 Admin Panel ?
First location
Second location
I would like to know the below 2 locations of Magento 1 in Magento 2. Where can I find these 2 locations in Magento 2 Admin Panel ?
First location
Second location
Unfortunately, those options are gone now in Magento.
Regarding the visitor log, everything is logged via the \Magento\Customer\Model\Logger model and via events observers declared under \Magento\Customer\etc\frontend\events.xml.
However, the automatic cleaning seems to be totally gone.
Regarding the system and exceptions logs, same issue, it's not configurable via the backend anymore and it's hardcoded directly in the following classes:
\Magento\Framework\Logger\Handler\Debug.php when you use the debug level, logs will go to /var/log/debug.log\Magento\Framework\Logger\Handler\Exception.php when you use the exception level, logs will go to /var/log/exception.log\Magento\Framework\Logger\Handler\System.php when you use the system level,
logs will got to /var/log/system.logIf you want to log your variables you can do this way.
<?php
namespace Test\Testpayment\Observer;
class Sendtogateway implements \Magento\Framework\Event\ObserverInterface
{
protected $_responseFactory;
protected $_url;
protected $order;
protected $logger;
protected $_checkoutSession;
public function __construct(
\Magento\Framework\App\ResponseFactory $responseFactory,
\Magento\Framework\UrlInterface $url,
\Magento\Sales\Api\Data\OrderInterface $order,
\Psr\Log\LoggerInterface $loggerInterface,
\Magento\Checkout\Model\Session $checkoutSession
){
$this->_responseFactory = $responseFactory;
$this->_url = $url;
$this->order = $order;
$this->logger = $loggerInterface;
$this->_checkoutSession = $checkoutSession;
}
public function execute(\Magento\Framework\Event\Observer $observer)
{
$id = $observer->getEvent()->getOrder()->getIncrementId();
$this->_checkoutSession->setOrderNo($id);
$orderdetail = $this->order->loadByIncrementId($id);
$customerBeforeAuthUrl = $this->_url->getUrl('testpay/index/index/');
$this->_responseFactory->create()->setRedirect($customerBeforeAuthUrl)->sendResponse();
$this->logger->debug('$id');
}
}