mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Clean up logging
Paths are now (hopefully) logged consistently across all crawlers
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user