Skip to content

Commit ba5ac52

Browse files
committed
[debug] add some more logging
1 parent d06fd5e commit ba5ac52

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/lnav.indexing.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,17 @@ rebuild_indexes(std::optional<ui_clock::time_point> deadline)
368368
});
369369

370370
const auto& dupe_name = lf.front()->get_unique_path();
371+
log_debug("Keeping duplicated file: %s; size=%lld; path=%s",
372+
lf.front()->get_content_id().c_str(),
373+
lf.front()->get_stat().st_size,
374+
lf.front()->get_filename_as_string().c_str());
371375
lf.pop_front();
372376
std::for_each(
373377
lf.begin(), lf.end(), [&dupe_name, &reload](auto& lf) {
374378
if (lf->mark_as_duplicate(dupe_name)) {
375-
log_info("Hiding duplicate file: %s",
376-
lf->get_filename().c_str());
379+
log_info(" Hiding copy: size=%lld; path=%s",
380+
lf->get_stat().st_size,
381+
lf->get_filename_as_string().c_str());
377382
lnav_data.ld_log_source.find_data(lf) |
378383
[](auto ld) { ld->set_visibility(false); };
379384
reload = true;

src/session_data.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -983,9 +983,10 @@ load_session()
983983
continue;
984984
}
985985

986-
log_debug("found state for file: %s %d",
986+
log_debug("found state for file: %s %d (%s)",
987987
lf->get_content_id().c_str(),
988-
iter->second.fs_is_visible);
988+
iter->second.fs_is_visible,
989+
lf->get_filename_as_string().c_str());
989990
lnav_data.ld_log_source.find_data(lf) |
990991
[iter, &log_changes](auto ld) {
991992
if (ld->ld_visible != iter->second.fs_is_visible) {

0 commit comments

Comments
 (0)