Reduce logging verbosity by downgrading frontmatter and permission warnings to debug level
This commit is contained in:
parent
e171a0dc35
commit
af7d1c0d2e
@ -162,7 +162,7 @@ def parse_markdown_file(raw: str) -> frontmatter.Post:
|
|||||||
try:
|
try:
|
||||||
return frontmatter.loads(raw)
|
return frontmatter.loads(raw)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.warning(f"Invalid frontmatter detected, falling back to plain markdown parsing: {exc}")
|
logger.debug(f"Invalid frontmatter detected, falling back to plain markdown parsing: {exc}")
|
||||||
content = raw
|
content = raw
|
||||||
if raw.startswith("---"):
|
if raw.startswith("---"):
|
||||||
match = re.match(r"^---\s*\r?\n.*?\r?\n---\s*\r?\n?", raw, flags=re.DOTALL)
|
match = re.match(r"^---\s*\r?\n.*?\r?\n---\s*\r?\n?", raw, flags=re.DOTALL)
|
||||||
@ -261,8 +261,8 @@ def _scan_vault(vault_name: str, vault_path: str) -> Dict[str, Any]:
|
|||||||
for tag in tags:
|
for tag in tags:
|
||||||
tag_counts[tag] = tag_counts.get(tag, 0) + 1
|
tag_counts[tag] = tag_counts.get(tag, 0) + 1
|
||||||
|
|
||||||
except PermissionError as e:
|
except PermissionError:
|
||||||
logger.warning(f"Permission denied, skipping {fpath}: {e}")
|
logger.debug(f"Permission denied, skipping {fpath}")
|
||||||
continue
|
continue
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error indexing {fpath}: {e}")
|
logger.error(f"Error indexing {fpath}: {e}")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user