How to log all Magento 2 SQL queries?

In your app/etc/di.xml, replace the line:

with