Skip to content

Instantly share code, notes, and snippets.

@ydenyshchenk
Created July 21, 2016 10:17
Show Gist options
  • Save ydenyshchenk/ccb9fb7f2e18860a7bc962ed855f50e6 to your computer and use it in GitHub Desktop.
Save ydenyshchenk/ccb9fb7f2e18860a7bc962ed855f50e6 to your computer and use it in GitHub Desktop.
Magento 2 - SQL Debug
diff --git app/etc/di.xml app/etc/di.xml
index 69403de..b43d771 100755
--- app/etc/di.xml
+++ app/etc/di.xml
@@ -93,7 +93,12 @@
<preference for="Magento\Framework\Api\MetadataObjectInterface" type="Magento\Framework\Api\AttributeMetadata"/>
<preference for="Magento\Framework\Api\SearchCriteriaInterface" type="Magento\Framework\Api\SearchCriteria"/>
<preference for="Magento\Framework\App\Rss\UrlBuilderInterface" type="Magento\Framework\App\Rss\UrlBuilder"/>
- <preference for="Magento\Framework\DB\LoggerInterface" type="Magento\Framework\DB\Logger\Quiet"/>
+ <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>
+ </arguments>
+ </type>
<preference for="Magento\Framework\App\ResourceConnection\ConnectionAdapterInterface" type="Magento\Framework\Model\ResourceModel\Type\Db\Pdo\Mysql"/>
<preference for="Magento\Framework\DB\QueryInterface" type="Magento\Framework\DB\Query"/>
<preference for="Magento\Framework\App\ProductMetadataInterface" type="Magento\Framework\App\ProductMetadata"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment