Skip to content

Commit

Permalink
declar logger
Browse files Browse the repository at this point in the history
  • Loading branch information
smrgeoinfo authored Dec 21, 2023
1 parent 4b1cf2a commit 9a722f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/vocab2mdCacheV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9a722f3

Please sign in to comment.