summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/SharedCache.cpp
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-04-02 05:35:19 -0400
committerMason Reed <mason@vector35.com>2025-04-02 05:36:54 -0400
commitbc4ad889f0edc54f0f6e073e3f5a474d8cec55e3 (patch)
tree1eaa7be6e8f53ca7b09f089a568ee2ddc42581ac /view/sharedcache/core/SharedCache.cpp
parentcfb8215d6aa0703ad0d6c3046431536b4e37d810 (diff)
[SharedCache] Consistent logger naming and misc changes
Diffstat (limited to 'view/sharedcache/core/SharedCache.cpp')
-rw-r--r--view/sharedcache/core/SharedCache.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/view/sharedcache/core/SharedCache.cpp b/view/sharedcache/core/SharedCache.cpp
index d0c3d25b..65d5aec1 100644
--- a/view/sharedcache/core/SharedCache.cpp
+++ b/view/sharedcache/core/SharedCache.cpp
@@ -491,7 +491,7 @@ std::optional<CacheSymbol> SharedCache::GetSymbolWithName(const std::string& nam
CacheProcessor::CacheProcessor(Ref<BinaryView> view)
{
m_view = std::move(view);
- m_logger = new Logger("CacheProcessor", m_view->GetFile()->GetSessionId());
+ m_logger = new Logger("SharedCache.Processor", m_view->GetFile()->GetSessionId());
}
bool CacheProcessor::ProcessCache(SharedCache& cache)
@@ -523,6 +523,7 @@ bool CacheProcessor::ProcessFileCache(SharedCache& cache)
catch (const std::exception& e)
{
// Just return false so the view init can continue.
+ m_logger->LogErrorF("Failed to load base entry {}... {}", baseFileName, e.what());
return false;
}
@@ -535,7 +536,7 @@ bool CacheProcessor::ProcessFileCache(SharedCache& cache)
auto currentFilePath = entry.path().string();
auto currentFileName = BaseFileName(currentFilePath);
// Skip our base file, obviously.
- if (currentFilePath== baseFilePath)
+ if (currentFilePath == baseFilePath)
continue;
// Filter files that don't contain the base file name i.e. "dyld_shared_cache_arm64e"
if (currentFilePath.find(baseFileName) == std::string::npos)
@@ -559,7 +560,9 @@ bool CacheProcessor::ProcessFileCache(SharedCache& cache)
cache.AddEntry(std::move(*additionalEntry));
}
catch (const std::exception& e)
- {}
+ {
+ m_logger->LogErrorF("Failed to load entry {}... {}", currentFileName, e.what());
+ }
}
return true;