add logging to the connection for queries