Last active
April 18, 2017 07:45
-
-
Save ivanweiler/92300cc86cbd9f7770830fa5aabfe765 to your computer and use it in GitHub Desktop.
Magento 2 log database queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
/** | |
* Log Db Queries | |
* Copy to /app/etc/local.di.xml (di.xml glob follows {*di.xml, */*di.xml} pattern) | |
*/ | |
--> | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> | |
<preference for="Magento\Framework\DB\LoggerInterface" type="Magento\Framework\DB\Logger\File"/> | |
<type name="Magento\Framework\DB\Logger\File"> | |
<arguments> | |
<argument name="debugFile" xsi:type="string">debug/db.log</argument> | |
<argument name="logAllQueries" xsi:type="boolean">true</argument> | |
<argument name="logQueryTime" xsi:type="number">0.05</argument> | |
<argument name="logCallStack" xsi:type="boolean">false</argument> | |
</arguments> | |
</type> | |
</config> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment