def log_exc(exc, url, wb): exc_filename = io.safe_filename("exc", dir=io.LOGDIR) io.serialize(exc, exc_filename, dir=io.LOGDIR) s = traceback.format_exc() s += "\nBad url: |%s|\n" % url node = wb.get(url) for u in node.incoming.keys(): s += "Ref : |%s|\n" % u s += "Exception object serialized to file: %s\n\n" % exc_filename io.savelog(s, "error_log", "a")
def logerror(path): io.savelog("Path failed: %s\n" % path, "error_dumpstream")