Add logging to RdbQuery