From b7990ed25b53fa3caec16b745ee2629f867e6b43 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 14 Sep 2024 02:52:38 -0500 Subject: [PATCH] [keel] Make pack file copy logging nest for dir level --- src/olympic/keel/src/pack.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/olympic/keel/src/pack.cpp b/src/olympic/keel/src/pack.cpp index ce3a6778..6f92eb6f 100644 --- a/src/olympic/keel/src/pack.cpp +++ b/src/olympic/keel/src/pack.cpp @@ -135,8 +135,10 @@ static ox::Error transformClaw( static ox::Error copy( ox::FileSystem &src, ox::FileSystem &dest, - ox::CRStringView path) noexcept { - oxOutf("copying directory: {}\n", path); + ox::CRStringView path, + ox::CRStringView logPrefix = "") noexcept { + oxOutf("{}copying directory: {}\n", logPrefix, path); + auto const childLogPrefix = ox::sfmt("{}\t", logPrefix); // copy oxRequire(fileList, src.ls(path)); for (auto const&name : fileList) { @@ -147,10 +149,10 @@ static ox::Error copy( oxRequire(stat, src.stat(currentFile)); if (stat.fileType == ox::FileType::Directory) { oxReturnError(dest.mkdir(currentFile, true)); - oxReturnError(copy(src, dest, currentFile + '/')); + oxReturnError(copy(src, dest, currentFile + '/', childLogPrefix)); } else { // load file - oxOutf("copying file: {}...", currentFile); + oxOutf("{}copying file: {}...", childLogPrefix, currentFile); ox::StringView status = "failed"; oxDefer [&status] { oxOutf(" {}\n", status);