add in logging (bug 969149)
cope with tests which lack __name__