Add opt-in diagnostic logging
This commit is contained in:
+14
-2
@@ -1,6 +1,6 @@
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Iterable, Tuple
|
||||
from typing import Iterable, Optional, Tuple
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -12,6 +12,8 @@ class ScanConfig:
|
||||
out: Path
|
||||
report: Path
|
||||
reference_roots: Tuple[Path, ...] = ()
|
||||
verbose: bool = False
|
||||
log_file: Optional[Path] = None
|
||||
|
||||
@classmethod
|
||||
def build(
|
||||
@@ -21,5 +23,15 @@ class ScanConfig:
|
||||
out: Path,
|
||||
report: Path,
|
||||
reference_roots: Iterable[Path] = (),
|
||||
verbose: bool = False,
|
||||
log_file: Optional[Path] = None,
|
||||
) -> "ScanConfig":
|
||||
return cls(serato, music, out, report, tuple(reference_roots))
|
||||
return cls(
|
||||
serato,
|
||||
music,
|
||||
out,
|
||||
report,
|
||||
tuple(reference_roots),
|
||||
verbose,
|
||||
log_file,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user