Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

Commit 050d5ae

Browse files
committed
fix logging issues
1 parent 2b02809 commit 050d5ae

2 files changed

Lines changed: 7 additions & 16 deletions

File tree

steamlayer/discovery/local.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ def find(self, path: pathlib.Path) -> int | None:
2424

2525
if match:
2626
appid = int(match.group())
27-
log.info(f"Found AppID {appid} in {f}")
27+
log.info(f"Found AppID {appid} in '{f}'")
2828
return appid
2929

3030
except OSError as e:
31-
log.warning(f"Failed to read {f}: {e}")
31+
log.warning(f"Failed to read '{f}': {e}")
3232
continue
3333

3434
parent = path.parent
@@ -43,7 +43,7 @@ def find(self, path: pathlib.Path) -> int | None:
4343
match = re.search(r'"appid"\s+"(\d+)"', content)
4444
if match:
4545
appid = int(match.group(1))
46-
log.info(f"Found AppID {appid} in {manifest.name}")
46+
log.info(f"Found AppID {appid} in '{manifest.name}'")
4747
return appid
4848
except Exception:
4949
continue

steamlayer/game.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def run(self) -> None:
128128
if self.vault_root.exists() and any(self.vault_root.iterdir()):
129129
log.warning(
130130
"Previous backup detected... "
131-
f"A vault already exists at: {self.vault_root}\n"
131+
f"A vault already exists at: '{self.vault_root}'\n"
132132
"The patcher will proceed, but it will NOT overwrite existing backups."
133133
)
134134

@@ -158,14 +158,13 @@ def run(self) -> None:
158158
if self.dry_run:
159159
patched_dlls = dlls # used for logging at the end
160160
for dll in dlls:
161-
log.info(f"[DRY RUN] Would vault original to: {dll.backup_path}")
162-
log.info(f"[DRY RUN] Would overwrite: {dll.file}")
161+
log.info(f"[DRY RUN] Would vault original to: '{dll.backup_path}'")
162+
log.info(f"[DRY RUN] Would overwrite: '{dll.file}'")
163163

164164
for target_dir in {d.file.parent for d in dlls}:
165165
log.info(
166166
f"[DRY RUN] Would configure '{target_dir}' using the following flags: "
167-
f"(APPID={self.game.appid} DLLS={dlls} DLCS={self.game.dlcs}). "
168-
f"User-specific information would also be correctly written."
167+
f"(APPID={self.game.appid} DLLS={len(dlls)} DLCS={len(self.game.dlcs)}). "
169168
)
170169

171170
else:
@@ -183,13 +182,6 @@ def run(self) -> None:
183182
"— the game may still work with default settings."
184183
)
185184

186-
dlc_count = len(self.game.dlcs) if self.game.dlcs else 0
187-
dll_count = len(patched_dlls)
188-
189-
log.info(
190-
f"{dry_prefix}Patch completed successfully (AppID={appid}, DLLs={dll_count}, DLCs={dlc_count})"
191-
)
192-
193185

194186
class GameRestorer:
195187
def __init__(self, game: Game, emulator: Emulator, *, dry_run: bool = False) -> None:
@@ -217,7 +209,6 @@ def run(self) -> None:
217209

218210
restored_successfully: list[tuple[BackedUpFile, pathlib.Path]] = []
219211
restoration_failed = False
220-
221212
for vaulted_path in all_vaulted:
222213
rel = vaulted_path.relative_to(self.vault_root)
223214
original_dest = self.game.path / rel

0 commit comments

Comments
 (0)