ENH:  extended query logging to command and transaction classes