Clean up logging

Paths are now (hopefully) logged consistently across all crawlers
This commit is contained in:
Joscha
2021-05-23 11:30:16 +02:00
parent c88f20859a
commit 803e5628a2
8 changed files with 95 additions and 56 deletions

View File

@ -10,6 +10,7 @@ from pathlib import PurePath
from typing import Dict, Optional, Union
from .logging import log
from .utils import fmt_path
class Rule(ABC):
@ -327,7 +328,7 @@ class Transformer:
result = rule.transform(path)
if isinstance(result, PurePath):
log.explain(f"Match! Transformed to {result}")
log.explain(f"Match! Transformed to {fmt_path(result)}")
return result
elif result: # Exclamation mark
log.explain("Match! Ignored")