debug logs

pull/35/head
deadc0de6 12 months ago
parent d00964483e
commit a16838299f

@ -94,7 +94,7 @@ class Catalog:
def _restore_json(self, string: str) -> Optional[NodeTop]:
"""restore the tree from json"""
imp = JsonImporter()
self._debug(f'import from string: {string}')
self._debug('import from string...')
root = imp.import_(string)
self._debug(f'Catalog imported from json \"{self.path}\"')
self._debug(f'root imported: {root}')

@ -210,12 +210,15 @@ def cmd_find(args: Dict[str, Any],
raw = args['--raw-size']
script = args['--script']
search_for = args['<term>']
if args['--verbose']:
Logger.debug(f'search for \"{search_for}\" under \"{top.name}\"')
found = noder.find_name(top, search_for,
script=script,
startnode=startpath,
only_dir=directory,
parentfromtree=fromtree,
fmt=fmt, raw=raw)
fmt=fmt,
raw=raw)
return found

@ -38,7 +38,7 @@ class NodeAny(NodeMixin): # type: ignore
if self.children:
ret += '\n'
for child in self.children:
ret += ' child => ' + str(child)
ret += f' child => {child}\n'
return ret
def __str__(self) -> str:

Loading…
Cancel
Save