Adds support to log slow queries