From 9a722f37a2e22227f88c8f82f0e06b6365044cbb Mon Sep 17 00:00:00 2001 From: Stephen Richard Date: Thu, 21 Dec 2023 14:01:12 -0700 Subject: [PATCH] declar logger --- tools/vocab2mdCacheV2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/vocab2mdCacheV2.py b/tools/vocab2mdCacheV2.py index 39af7b3..ae20393 100644 --- a/tools/vocab2mdCacheV2.py +++ b/tools/vocab2mdCacheV2.py @@ -148,6 +148,7 @@ def getNarrower(g, v, r): return res def getObjects(g, s, p): + L = getLogger() q = rdflib.plugins.sparql.prepareQuery(PFX + """SELECT ?o WHERE { ?subject ?predicate ?o . @@ -175,6 +176,7 @@ def _labelToLink(label): def termTree(g, v, r, depth=0): label = getObjects(g, r, skosT("prefLabel")) + L = getLogger() L.debug("termTree label: %s",label) llabel = _labelToLink(r) if not label: @@ -289,6 +291,7 @@ def describeNarrowerTerms(g, v, r, depth=0, level=[]): def describeVocabulary(G, V): res = [] level = [1, ] + L = getLogger() L.debug(f"vocab2md: {G} graph input") # this is the header for Quarto in the markdown output @@ -393,7 +396,7 @@ def main(source, vocabulary): # vocabs = listVocabularies(vgraph) # res = [] # res.append(conceptschemelist(vgraph)) - + verbosity = "DEBUG".upper() logging_config["loggers"][""]["level"] = verbosity logging.config.dictConfig(logging_config)