From bc4ad889f0edc54f0f6e073e3f5a474d8cec55e3 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 2 Apr 2025 05:35:19 -0400 Subject: [SharedCache] Consistent logger naming and misc changes --- view/sharedcache/core/SharedCache.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'view/sharedcache/core/SharedCache.cpp') 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 SharedCache::GetSymbolWithName(const std::string& nam CacheProcessor::CacheProcessor(Ref 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; -- cgit v1.3.1