aboutsummaryrefslogtreecommitdiff
path: root/zenstore
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-15 13:18:34 +0200
committerStefan Boberg <[email protected]>2021-09-15 13:18:34 +0200
commitab95978c10258cab130ef7e6dc3f7cb7a1bf337d (patch)
treea6e4ca55890f5b728f69ccf8878af98ba2e31bc9 /zenstore
parentAdded #ifdef condition around Windows-specific exception handling (diff)
parentCross-platform zen::GetLastError() (diff)
downloadzen-ab95978c10258cab130ef7e6dc3f7cb7a1bf337d.tar.xz
zen-ab95978c10258cab130ef7e6dc3f7cb7a1bf337d.zip
Merged from main
Diffstat (limited to 'zenstore')
-rw-r--r--zenstore/CAS.cpp5
-rw-r--r--zenstore/caslog.cpp2
-rw-r--r--zenstore/cidstore.cpp4
-rw-r--r--zenstore/filecas.cpp12
4 files changed, 11 insertions, 12 deletions
diff --git a/zenstore/CAS.cpp b/zenstore/CAS.cpp
index c05e3703d..e77c0ed64 100644
--- a/zenstore/CAS.cpp
+++ b/zenstore/CAS.cpp
@@ -8,13 +8,12 @@
#include <doctest/doctest.h>
#include <zencore/except.h>
#include <zencore/fmtutils.h>
+#include <zencore/logging.h>
#include <zencore/memory.h>
#include <zencore/string.h>
#include <zencore/thread.h>
#include <zencore/uid.h>
-#include <spdlog/spdlog.h>
-
#include <gsl/gsl-lite.hpp>
#include <filesystem>
@@ -64,7 +63,7 @@ CasImpl::Initialize(const CasStoreConfiguration& InConfig)
{
m_Config = InConfig;
- spdlog::info("initializing CAS pool at {}", m_Config.RootDirectory);
+ ZEN_INFO("initializing CAS pool at {}", m_Config.RootDirectory);
// Ensure root directory exists - create if it doesn't exist already
diff --git a/zenstore/caslog.cpp b/zenstore/caslog.cpp
index 169629053..34860538a 100644
--- a/zenstore/caslog.cpp
+++ b/zenstore/caslog.cpp
@@ -7,6 +7,7 @@
#include <zencore/except.h>
#include <zencore/filesystem.h>
#include <zencore/fmtutils.h>
+#include <zencore/logging.h>
#include <zencore/memory.h>
#include <zencore/string.h>
#include <zencore/thread.h>
@@ -14,7 +15,6 @@
#include <xxhash.h>
-#include <spdlog/spdlog.h>
#include <gsl/gsl-lite.hpp>
#include <functional>
diff --git a/zenstore/cidstore.cpp b/zenstore/cidstore.cpp
index 391520599..e6c7f98ee 100644
--- a/zenstore/cidstore.cpp
+++ b/zenstore/cidstore.cpp
@@ -4,10 +4,10 @@
#include <zencore/compress.h>
#include <zencore/filesystem.h>
+#include <zencore/logging.h>
#include <zenstore/CAS.h>
#include <zenstore/caslog.h>
-#include <spdlog/spdlog.h>
#include <filesystem>
namespace zen {
@@ -86,7 +86,7 @@ struct CidStore::CidState
m_LogFile.Replay([&](const IndexEntry& Ie) { m_CidMap.insert_or_assign(Ie.Uncompressed, Ie.Compressed); });
- spdlog::debug("CID index initialized: {} entries found", m_CidMap.size());
+ ZEN_DEBUG("CID index initialized: {} entries found", m_CidMap.size());
}
void Flush() { m_LogFile.Flush(); }
diff --git a/zenstore/filecas.cpp b/zenstore/filecas.cpp
index 56d25e729..170f13875 100644
--- a/zenstore/filecas.cpp
+++ b/zenstore/filecas.cpp
@@ -5,12 +5,12 @@
#include <zencore/except.h>
#include <zencore/filesystem.h>
#include <zencore/fmtutils.h>
+#include <zencore/logging.h>
#include <zencore/memory.h>
#include <zencore/string.h>
#include <zencore/thread.h>
#include <zencore/uid.h>
-#include <spdlog/spdlog.h>
#include <gsl/gsl-lite.hpp>
#include <filesystem>
@@ -84,7 +84,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash)
if (!Success)
{
- spdlog::warn("Failed to flag temporary payload file for deletion: '{}'", PathFromHandle(FileRef.FileHandle));
+ ZEN_WARN("Failed to flag temporary payload file for deletion: '{}'", PathFromHandle(FileRef.FileHandle));
}
};
@@ -173,9 +173,9 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash)
return CasStore::InsertResult{.New = true};
}
- spdlog::warn("rename of CAS payload file failed ('{}'), falling back to regular write for insert of {}",
- GetLastErrorAsString(),
- ChunkHash);
+ ZEN_WARN("rename of CAS payload file failed ('{}'), falling back to regular write for insert of {}",
+ GetLastErrorAsString(),
+ ChunkHash);
DeletePayloadFileOnClose();
}
@@ -224,7 +224,7 @@ FileCasStrategy::InsertChunk(const void* const ChunkData, const size_t ChunkSize
if ((hRes != HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) && (hRes != HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)))
{
- spdlog::warn("Unexpected error code when opening shard file for read: {:#x}", uint32_t(hRes));
+ ZEN_WARN("Unexpected error code when opening shard file for read: {:#x}", uint32_t(hRes));
}
auto InternalCreateFile = [&] { return PayloadFile.Create(ShardedPath.c_str(), GENERIC_WRITE, FILE_SHARE_DELETE, CREATE_ALWAYS); };