mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 15:35:05 +02:00
Clean up logging
Paths are now (hopefully) logged consistently across all crawlers
This commit is contained in:
parent
c88f20859a
commit
803e5628a2
8 changed files with 95 additions and 56 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue