filesystem: basic match logging

This commit is contained in:
Dan Bungert 2024-03-12 18:09:48 -06:00
parent d81bb5e247
commit e6dde2e324
1 changed files with 3 additions and 0 deletions

View File

@ -1641,6 +1641,7 @@ class FilesystemModel:
return matchers
def disk_for_match(self, disks, match):
log.info(f"considering {disks} for {match}")
matchers = self._make_matchers(match)
candidates = []
for candidate in disks:
@ -1658,7 +1659,9 @@ class FilesystemModel:
if match.get("size") == "largest":
candidates.sort(key=lambda d: d.size, reverse=True)
if candidates:
log.info(f"For match {match}, using the first candidate from {candidates}")
return candidates[0]
log.info(f"For match {match}, no devices match")
return None
def assign_omitted_offsets(self):