# HG changeset patch # User drewp@bigasterisk.com # Date 1685653411 25200 # Node ID ae6821e203acc38ac6ad2e073bb5befbdb678a38 # Parent 8fa6a47521d7ec66975766498e94fd89423af76d junky shortener for debug logs diff -r 8fa6a47521d7 -r ae6821e203ac rdfdb/shared_graph.py --- a/rdfdb/shared_graph.py Thu Jun 01 14:03:02 2023 -0700 +++ b/rdfdb/shared_graph.py Thu Jun 01 14:03:31 2023 -0700 @@ -57,10 +57,13 @@ return log.info("patching graph %s %s" % (ctx, patch.shortSummary())) if log.isEnabledFor(logging.DEBUG): + def sterm(s): return s.replace('rdflib.term.', '').replace('http://light9.bigasterisk.com', ':') + def shorten(quad): + return f'{sterm(quad[0])} {sterm(quad[1])} {sterm(quad[2])} {sterm(quad[3])}' for q in patch.delQuads: - log.debug(f'- {q}') + log.debug(f'- {shorten(q)}') for q in patch.addQuads: - log.debug(f'+ {q}') + log.debug(f'+ {shorten(q)}') # if hasattr(self, 'watchedFiles'): # todo: eliminate this # self.watchedFiles.aboutToPatch(ctx)