From 3e41b1b287c956ed17ab065cf4391aae05333e52 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 1 Jul 2024 22:43:48 -0700 Subject: [PATCH] LogReader: show total segment count in missing rlog prompt --- tools/lib/logreader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/logreader.py b/tools/lib/logreader.py index f6932c029aeb43..6ad77bf823a5d1 100755 --- a/tools/lib/logreader.py +++ b/tools/lib/logreader.py @@ -98,10 +98,10 @@ def auto_strategy(rlog_paths: LogPaths, qlog_paths: LogPaths, interactive: bool, missing_rlogs = [rlog is None or not valid_file(rlog) for rlog in rlog_paths].count(True) if missing_rlogs != 0: if interactive: - if input(f"{missing_rlogs} rlogs were not found, would you like to fallback to qlogs for those segments? (y/n) ").lower() != "y": + if input(f"{missing_rlogs}/{len(rlog_paths)} rlogs were not found, would you like to fallback to qlogs for those segments? (y/n) ").lower() != "y": return rlog_paths else: - cloudlog.warning(f"{missing_rlogs} rlogs were not found, falling back to qlogs for those segments...") + cloudlog.warning(f"{missing_rlogs}/{len(rlog_paths)} rlogs were not found, falling back to qlogs for those segments...") return [rlog if valid_file(rlog) else (qlog if valid_file(qlog) else None) for (rlog, qlog) in zip(rlog_paths, qlog_paths, strict=True)]