Showing posts with label Logging. Show all posts
Showing posts with label Logging. Show all posts

Saturday 8 December 2018

How to log all | full SQL | Mysql queries in Magento 2

Show ALL | Full magento 2 query with Sorting, Pagination and Filter in Magento 2

Open : /var/www/html/magento/jaydip kansagra/app/etc/di.xml


Find 

<preference for="Magento\Framework\DB\LoggerInterface" 

Replace

<preference for="Magento\Framework\DB\LoggerInterface" type="Magento\Framework\DB\Logger\File"/>
 <type name="Magento\Framework\DB\Logger\File">
      <arguments>
          <argument name="logAllQueries" xsi:type="boolean">true</argument>
          <argument name="debugFile" xsi:type="string">log/sql.log</argument>
      </arguments>
 </type>


Open : /var/www/html/magento/frye-magento/var/log/sql.log

Wednesday 20 April 2016

How to enable error and exception logging log in magento

By default, Magento does not enable messages about errors and exceptions logging; so if something bad happens, you don't even know.
To turn on the logging, you can change to
System > Configuration > Developer > Log Settings and set the «Enabled» option to «Yes»
Don't forget to set full access permissions (777) of following folder: /var/log, since that is the place where those log files are stored.