Log queries sent to the database